drcl.net.traffic
Class tsTokenBucket
java.lang.Object
drcl.DrclObj
drcl.net.traffic.TrafficShaper
drcl.net.traffic.tsTokenBucket
- All Implemented Interfaces:
- java.lang.Cloneable, ObjectCloneable, ObjectDuplicable, java.io.Serializable
- public class tsTokenBucket
- extends TrafficShaper
A traffic shaper that conforms to the token bucket
traffic model.
- See Also:
traffic_TokenBucket,
Serialized Form
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
tsTokenBucket
public tsTokenBucket()
tsTokenBucket
public tsTokenBucket(traffic_TokenBucket traffic_)
reset
public void reset()
- Overrides:
reset in class TrafficShaper
info
public java.lang.String info(java.lang.String prefix_)
- Description copied from class:
TrafficShaper
- Prints out the content of this traffic shaper instance.
This class prints out the associated traffic model and the buffer.
A subclass only needs to call
super.info(prefix_) and
then supply the content of the parameters defined in the subclass.
- Overrides:
info in class TrafficShaper
- Parameters:
prefix_ - prefix_ that should be prepended at each line.
getTrafficModel
public TrafficModel getTrafficModel()
- Description copied from class:
TrafficShaper
- Returns the associated traffic model.
- Specified by:
getTrafficModel in class TrafficShaper
setTrafficModel
public void setTrafficModel(TrafficModel traffic_)
- Description copied from class:
TrafficShaper
- Sets the associated traffic model.
- Specified by:
setTrafficModel in class TrafficShaper
setOutputRate
public void setOutputRate(double rate_)
getOutputRate
public double getOutputRate()
setTokenGenRate
public void setTokenGenRate(int rate_)
getTokenGenRate
public int getTokenGenRate()
setBucketSize
public void setBucketSize(int size_)
getBucketSize
public int getBucketSize()
setInitBucketSize
public void setInitBucketSize(int size_)
getInitBucketSize
public int getInitBucketSize()
getMTU
public int getMTU()
setMTU
public void setMTU(int mtu_)
set
public void set(int bsize_,
int initbsize_,
int trate_,
double outrate_,
int mtu_)
Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved. ~ To J-Sim Home ~