public interface Queue extends Source, Sink
The interface design is heavily influenced by Matt Welsh's SandStorm server, his demonstration of the SEDA architecture. We have deviated where we felt the design differences where better.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ROLE |
| Modifier and Type | Method and Description |
|---|---|
DequeueInterceptor |
getDequeueInterceptor()
Return the dequeue executable for this sink.
|
EnqueuePredicate |
getEnqueuePredicate()
Return the enqueue predicate for this sink.
|
void |
setDequeueInterceptor(DequeueInterceptor executable)
Set the dequeue executable for this sink.
|
void |
setEnqueuePredicate(EnqueuePredicate enqueuePredicate)
Set the enqueue predicate for this sink.
|
dequeue, dequeue, dequeueAll, setTimeout, sizecanAccept, enqueue, enqueue, isFull, maxSize, prepareEnqueue, size, tryEnqueuevoid setEnqueuePredicate(EnqueuePredicate enqueuePredicate)
Sink.enqueue(Object),
which means it must be simple and fast. This can be used
to implement many interesting m_sink-thresholding policies,
such as simple count threshold, credit-based mechanisms,
and more.enqueuePredicate - the enqueue predicate for this sinkEnqueuePredicate getEnqueuePredicate()
EnqueuePredicate
the enqueue predicate for this sink.void setDequeueInterceptor(DequeueInterceptor executable)
executable - The dequeue executable for this sink.DequeueInterceptor getDequeueInterceptor()
DequeueInterceptor
The dequeue executable for this sink.