| seda.sandStorm.api.SourceIF
SourceIF | public interface SourceIF (Code) | | A SourceIF implements the 'source side' of an event queue: it supports
dequeue operations only.
author: Matt Welsh |
Method Summary | |
public QueueElementIF | blocking_dequeue(int timeout_millis) Just like blocking_dequeue_all, but returns only a single element. | public 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. | public 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. | public QueueElementIF | dequeue() Dequeues the next element, or returns null if there is
nothing left on the queue. | public QueueElementIF[] | dequeue(int num) Dequeues at most num available elements, or returns
null if there is nothing left on the queue. | public QueueElementIF[] | dequeue_all() Dequeues all available elements, or returns null if there is
nothing left on the queue. | public int | size() Returns the number of elements waiting in this queue. |
blocking_dequeue | public QueueElementIF blocking_dequeue(int timeout_millis)(Code) | | Just like blocking_dequeue_all, but returns only a single element.
|
blocking_dequeue | public QueueElementIF[] blocking_dequeue(int timeout_millis, int num)(Code) | | This method blocks on the queue up until a timeout occurs or
until an element appears on the queue. It returns at most
num elements waiting on the queue at that time.
|
blocking_dequeue_all | public QueueElementIF[] blocking_dequeue_all(int timeout_millis)(Code) | | This method blocks on the queue up until a timeout occurs or
until an element appears on the queue. It returns all elements waiting
on the queue at that time.
Parameters: timeout_millis - if timeout_millis is 0 , this methodwill be non-blocking and will return right away, whether or notany 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 alittle more. an array of QueueElementIF 's. This array willbe null if no elements were pending. |
dequeue | public QueueElementIF dequeue()(Code) | | Dequeues the next element, or returns null if there is
nothing left on the queue.
the next QueueElementIF on the queue |
dequeue | public QueueElementIF[] dequeue(int num)(Code) | | Dequeues at most num available elements, or returns
null if there is nothing left on the queue.
At most num QueueElementIF s on the queue |
dequeue_all | public QueueElementIF[] dequeue_all()(Code) | | Dequeues all available elements, or returns null if there is
nothing left on the queue.
all pending QueueElementIF s on the queue |
size | public int size()(Code) | | Returns the number of elements waiting in this queue.
|
|
|