seda.sandStorm.api
Interface EnqueuePredicateIF
- All Known Implementing Classes:
- MulticlassRateLimitingPredicate, QueueThresholdPredicate, RateLimitingPredicate
public interface EnqueuePredicateIF
Enqueue predicates allow users to specify a method that will
'screen' elements being enqueued onto a sink, either accepting or
rejecting them. This mechanism can be used to implement many interesting
load-conditioning policies, for example, simple thresholding, rate
control, credit-based flow control, and so forth. Note that the enqueue
predicate runs in the context of the caller of enqueue(), which
means it must be simple and fast.
- See Also:
SinkIF
Method Summary |
boolean |
accept(QueueElementIF element)
Tests the given element for acceptance onto the queue. |
accept
boolean accept(QueueElementIF element)
- Tests the given element for acceptance onto the queue.
- Parameters:
element
- The QueueElementIF
to enqueue
- Returns:
- True if the sink accepts the element; false otherwise.