|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object seda.sandStorm.core.QueueThresholdPredicate
public class QueueThresholdPredicate
This enqueue predicate implements a simple threshold for the size of the queue.
Field Summary | |
---|---|
private static boolean |
DEBUG
|
private SinkIF |
thesink
|
private int |
threshold
|
Constructor Summary | |
---|---|
QueueThresholdPredicate(SinkIF sink,
int threshold)
Create a new QueueThresholdPredicate for the given sink and threshold. |
Method Summary | |
---|---|
boolean |
accept(QueueElementIF qel)
Returns true if the given element can be accepted into the queue. |
int |
getThreshold()
Return the current queue threshold. |
void |
setThreshold(int threshold)
Set the current queue threshold. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final boolean DEBUG
private SinkIF thesink
private int threshold
Constructor Detail |
---|
public QueueThresholdPredicate(SinkIF sink, int threshold)
Method Detail |
---|
public boolean accept(QueueElementIF qel)
accept
in interface EnqueuePredicateIF
qel
- The QueueElementIF
to enqueue
public int getThreshold()
public void setThreshold(int threshold)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |