| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
| 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.
| Field Summary | |
|---|---|
| private  seda.util.StatsGatherer | acceptArrivalStats | 
| private static boolean | DEBUG | 
| private  int[] | depth | 
| private  seda.util.StatsGatherer | interArrivalStats | 
| private  long[] | lasttime | 
| private  long | MIN_REGEN_TIME | 
| private  int | NUM_CLASSES | 
| private static boolean | PROFILE | 
| private  double[] | regenTimeMS | 
| private  double[] | targetRate | 
| private  SinkIF | thesink | 
| private  double[] | tokenCount | 
| 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 | 
| Field Detail | 
|---|
private static final boolean DEBUG
private SinkIF thesink
private int NUM_CLASSES
private double[] targetRate
private int[] depth
private double[] tokenCount
private double[] regenTimeMS
private long[] lasttime
private long MIN_REGEN_TIME
private static final boolean PROFILE
private seda.util.StatsGatherer interArrivalStats
private seda.util.StatsGatherer acceptArrivalStats
| Constructor Detail | 
|---|
public MulticlassRateLimitingPredicate(SinkIF sink,
                                       int numclasses,
                                       double targetRate,
                                       int depth)
| Method Detail | 
|---|
public boolean accept(QueueElementIF qel)
accept in interface EnqueuePredicateIFqel - 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 All Classes | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||