|
|||||||||
| Home >> All >> echopoint >> [ asynch overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
echopoint.asynch
Class AsynchEventQueue

java.lang.Objectechopoint.asynch.AsynchEventQueue
- All Implemented Interfaces:
- AsynchEventSink, java.io.Serializable
- public class AsynchEventQueue
- extends java.lang.Object
- implements AsynchEventSink, java.io.Serializable
- extends java.lang.Object
AysnchEventQueue is a class that
can hold AsyncEvents in a queue'ed fashion.
| Field Summary | |
private int |
capacity
|
private int |
front
|
private java.lang.Object[] |
queue
|
private int |
rear
|
| Constructor Summary | |
AsynchEventQueue()
Constructs a AysnchEventQueue with a capacity
of 20 events. |
|
AsynchEventQueue(int capacity)
Constructs a AysnchEventQueue with the
specified capacity. |
|
| Method Summary | |
AsynchEvent |
getEvent()
Returns the next event in the sink, waiting forever till one is available. |
AsynchEvent |
getEvent(long waitTime)
Returns the next event in the sink, waiting for waitTime. |
int |
getSize()
Returns the number of events in the queue |
boolean |
isEmpty()
Is the queue empty ? |
boolean |
isFull()
Is the queue full ? |
private int |
next(int index)
Circular counter. |
boolean |
putEvent(AsynchEvent asynchEvent)
Puts an event into the sink, waiting forever until there is room to place the event.. |
boolean |
putEvent(AsynchEvent asynchEvent,
int waitTime)
Puts an event into the sink, waiting up to waitTime until there is room to place the event. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
capacity
private int capacity
queue
private java.lang.Object[] queue
front
private int front
rear
private int rear
| Constructor Detail |
AsynchEventQueue
public AsynchEventQueue()
- Constructs a
AysnchEventQueuewith a capacity of 20 events.
AsynchEventQueue
public AsynchEventQueue(int capacity)
- Constructs a
AysnchEventQueuewith the specified capacity.
| Method Detail |
getEvent
public AsynchEvent getEvent() throws java.lang.InterruptedException
- Description copied from interface:
AsynchEventSink - Returns the next event in the sink, waiting forever till
one is available.
- Specified by:
getEventin interfaceAsynchEventSink
getEvent
public AsynchEvent getEvent(long waitTime) throws java.lang.InterruptedException
- Description copied from interface:
AsynchEventSink - Returns the next event in the sink, waiting for
waitTime.
- Specified by:
getEventin interfaceAsynchEventSink
putEvent
public boolean putEvent(AsynchEvent asynchEvent) throws java.lang.InterruptedException
- Description copied from interface:
AsynchEventSink - Puts an event into the sink, waiting forever until there
is room to place the event..
- Specified by:
putEventin interfaceAsynchEventSink
putEvent
public boolean putEvent(AsynchEvent asynchEvent, int waitTime) throws java.lang.InterruptedException
- Description copied from interface:
AsynchEventSink - Puts an event into the sink, waiting up to waitTime until there
is room to place the event.
- Specified by:
putEventin interfaceAsynchEventSink
isFull
public boolean isFull()
- Is the queue full ?
isEmpty
public boolean isEmpty()
- Is the queue empty ?
getSize
public int getSize()
- Returns the number of events in the queue
next
private int next(int index)
- Circular counter.
|
|||||||||
| Home >> All >> echopoint >> [ asynch overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
echopoint.asynch.AsynchEventQueue