| java.lang.Object seda.sandStorm.core.QueueThresholdPredicate
QueueThresholdPredicate | public class QueueThresholdPredicate implements EnqueuePredicateIF(Code) | | This enqueue predicate implements a simple threshold for the
size of the queue.
|
Constructor Summary | |
public | QueueThresholdPredicate(SinkIF sink, int threshold) Create a new QueueThresholdPredicate for the given sink and
threshold. |
Method Summary | |
public boolean | accept(QueueElementIF qel) Returns true if the given element can be accepted into the queue. | public int | getThreshold() Return the current queue threshold. | public void | setThreshold(int threshold) Set the current queue threshold. |
QueueThresholdPredicate | public QueueThresholdPredicate(SinkIF sink, int threshold)(Code) | | Create a new QueueThresholdPredicate for the given sink and
threshold. A threshold of -1 indicates no threshold.
|
accept | public boolean accept(QueueElementIF qel)(Code) | | Returns true if the given element can be accepted into the queue.
|
getThreshold | public int getThreshold()(Code) | | Return the current queue threshold.
|
setThreshold | public void setThreshold(int threshold)(Code) | | Set the current queue threshold. A queue threshold of -1 indicates
an infinite threshold.
|
|
|