|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectseda.sandStorm.core.MulticlassRateLimitingPredicate
public class MulticlassRateLimitingPredicate
This enqueue predicate implements multiclass input rate policing.
Constructor Summary | |
---|---|
MulticlassRateLimitingPredicate(SinkIF sink,
int numclasses,
double targetRate,
int depth)
Create a new RateLimitingPredicate for the given sink, targetRate, and token bucket depth. |
Method Summary | |
---|---|
boolean |
accept(QueueElementIF qel)
Returns true if the given element can be accepted into the queue. |
int |
getBucketSize(int theclass)
Return the number of tokens currently in the bucket. |
int |
getDepth(int theclass)
Return the current depth. |
double |
getTargetRate(int theclass)
Return the current rate limit. |
void |
setDepth(int theclass,
int depth)
Set the bucket depth. |
void |
setTargetRate(int theclass,
double targetRate)
Set the rate limit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MulticlassRateLimitingPredicate(SinkIF sink, int numclasses, double targetRate, int depth)
Method Detail |
---|
public boolean accept(QueueElementIF qel)
accept
in interface EnqueuePredicateIF
qel
- The QueueElementIF
to enqueue
public double getTargetRate(int theclass)
public int getDepth(int theclass)
public int getBucketSize(int theclass)
public void setTargetRate(int theclass, double targetRate)
public void setDepth(int theclass, int depth)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |