|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectechopoint.asynch.AsynchEventQueue
public class AsynchEventQueue
AysnchEventQueue is a class that
can hold AsyncEvents in a queue'ed fashion.
| 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 ? |
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 |
| Constructor Detail |
|---|
public AsynchEventQueue()
AysnchEventQueue with a capacity
of 20 events.
public AsynchEventQueue(int capacity)
AysnchEventQueue with the
specified capacity.
| Method Detail |
|---|
public AsynchEvent getEvent()
throws java.lang.InterruptedException
AsynchEventSink
getEvent in interface AsynchEventSinkjava.lang.InterruptedExceptionAsynchEventSink.getEvent()
public AsynchEvent getEvent(long waitTime)
throws java.lang.InterruptedException
AsynchEventSink
getEvent in interface AsynchEventSinkwaitTime - - how long to wait for an event
java.lang.InterruptedExceptionAsynchEventSink.getEvent(long)
public boolean putEvent(AsynchEvent asynchEvent)
throws java.lang.InterruptedException
AsynchEventSink
putEvent in interface AsynchEventSinkasynchEvent - - the event to place in the sink
java.lang.InterruptedExceptionAsynchEventSink.putEvent(echopoint.asynch.AsynchEvent)
public boolean putEvent(AsynchEvent asynchEvent,
int waitTime)
throws java.lang.InterruptedException
AsynchEventSink
putEvent in interface AsynchEventSinkasynchEvent - - the event to place in the sinkwaitTime - - how long to wait for room in the sink or - 1 to wait for ever
java.lang.InterruptedExceptionAsynchEventSink.putEvent(echopoint.asynch.AsynchEvent, int)public boolean isFull()
public boolean isEmpty()
public int getSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||