|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A SourceIF implements the 'source side' of an event queue: it supports dequeue operations only.
Method Summary | |
QueueElementIF[] |
blocking_dequeue_all(int timeout_millis)
This method blocks on the queue up until a timeout occurs or until an element appears on the queue. |
QueueElementIF |
blocking_dequeue(int timeout_millis)
Just like blocking_dequeue_all, but returns only a single element. |
QueueElementIF[] |
blocking_dequeue(int timeout_millis,
int num)
This method blocks on the queue up until a timeout occurs or until an element appears on the queue. |
QueueElementIF[] |
dequeue_all()
Dequeues all available elements, or returns null if there is
nothing left on the queue. |
QueueElementIF |
dequeue()
Dequeues the next element, or returns null if there is
nothing left on the queue. |
QueueElementIF[] |
dequeue(int num)
Dequeues at most num available elements, or returns
null if there is nothing left on the queue. |
int |
size()
Returns the number of elements waiting in this queue. |
Method Detail |
public QueueElementIF dequeue()
null
if there is
nothing left on the queue.
QueueElementIF
on the queuepublic QueueElementIF[] dequeue_all()
null
if there is
nothing left on the queue.
QueueElementIF
s on the queuepublic QueueElementIF[] dequeue(int num)
num
available elements, or returns
null
if there is nothing left on the queue.
num
QueueElementIF
s on the queuepublic QueueElementIF blocking_dequeue(int timeout_millis)
public QueueElementIF[] blocking_dequeue_all(int timeout_millis)
timeout_millis
- if timeout_millis is 0
, this method
will be non-blocking and will return right away, whether or not
any elements are pending on the queue. If timeout_millis is
-1
, this method blocks forever until something is
available. If timeout_millis is positive, this method will wait
about that number of milliseconds before returning, but possibly a
little more.
QueueElementIF
's. This array will
be null if no elements were pending.public QueueElementIF[] blocking_dequeue(int timeout_millis, int num)
num
elements waiting on the queue at that time.
public int size()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |