| java.lang.Object seda.sandStorm.core.RateLimitingPredicate
RateLimitingPredicate | public class RateLimitingPredicate implements EnqueuePredicateIF(Code) | | This enqueue predicate implements input rate policing.
|
Constructor Summary | |
public | RateLimitingPredicate(SinkIF sink, double targetRate, int depth) Create a new RateLimitingPredicate for the given sink,
targetRate, and token bucket depth. |
Method Summary | |
public boolean | accept(QueueElementIF qel) Returns true if the given element can be accepted into the queue. | public int | getBucketSize() Return the number of tokens currently in the bucket. | public int | getDepth() Return the current depth. | public double | getTargetRate() Return the current rate limit. | public void | setDepth(int depth) Set the bucket depth. | public void | setTargetRate(double targetRate) Set the rate limit. |
RateLimitingPredicate | public RateLimitingPredicate(SinkIF sink, double targetRate, int depth)(Code) | | Create a new RateLimitingPredicate for the given sink,
targetRate, and token bucket depth. A rate of -1.0 indicates no rate limit.
|
accept | public boolean accept(QueueElementIF qel)(Code) | | Returns true if the given element can be accepted into the queue.
|
getBucketSize | public int getBucketSize()(Code) | | Return the number of tokens currently in the bucket.
|
getDepth | public int getDepth()(Code) | | Return the current depth.
|
getTargetRate | public double getTargetRate()(Code) | | Return the current rate limit.
|
setDepth | public void setDepth(int depth)(Code) | | Set the bucket depth.
|
setTargetRate | public void setTargetRate(double targetRate)(Code) | | Set the rate limit. A limit of -1.0 indicates no rate limit.
|
|
|