More information: http://www.cs.berkeley.edu/~mdw/proj/seda/

seda.sandStorm.api
Interface EnqueuePredicateIF

All Known Implementing Classes:
RateLimitingPredicate, MulticlassRateLimitingPredicate, QueueThresholdPredicate

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.

Author:
Matt Welsh
See Also:
SinkIF

Method Summary
 boolean accept(QueueElementIF element)
          Tests the given element for acceptance onto the queue.
 

Method Detail

accept

public 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.

More information: http://www.cs.berkeley.edu/~mdw/proj/seda/