org.apache.excalibur.event
Interface Queue
- All Superinterfaces:
- Sink, Source
- All Known Implementing Classes:
- AbstractQueue
- public interface Queue
- extends Source, Sink
A Source implements the side of an event queue where QueueElements are dequeued operations only.
The interface design is heavily influenced by 's SandStorm server, his demonstration of the SEDA architecture. We have deviated where we felt the design differences where better.
- Author:
| Field Summary |
static java.lang.String |
ROLE
|
ROLE
public static final java.lang.String ROLE
-
setEnqueuePredicate
public void setEnqueuePredicate(EnqueuePredicate enqueuePredicate)
-
Set the enqueue predicate for this sink. This mechanism allows user to define a method that will 'screen' QueueElementIF's during the enqueue procedure to either accept or reject them. The enqueue predicate runs in the context of the caller of
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.
-
-
- Parameters:
enqueuePredicate - the enqueue predicate for this sink
- Since:
- Feb 10, 2003
getEnqueuePredicate
public EnqueuePredicate getEnqueuePredicate()
-
Return the enqueue predicate for this sink.
-
-
- Returns:
EnqueuePredicate the enqueue predicate for this sink.
- Since:
- Feb 10, 2003
setDequeueInterceptor
public void setDequeueInterceptor(DequeueInterceptor executable)
-
Set the dequeue executable for this sink. This mechanism allows users to define a methods that will be executed before or after dequeuing elements from a source
-
-
- Parameters:
executable - The dequeue executable for this sink.
- Since:
- Feb 10, 2003
getDequeueInterceptor
public DequeueInterceptor getDequeueInterceptor()
-
Return the dequeue executable for this sink.
-
-
- Returns:
DequeueInterceptor The dequeue executable for this sink.
- Since:
- Feb 10, 2003
Please see keelframework.org for information about new Keel releases.