drcl.inet.core.queue
Class SRED
java.lang.Object
|
+--drcl.DrclObj
|
+--drcl.comp.queue.QLogic
|
+--drcl.inet.core.queue.SRED
- All Implemented Interfaces:
- java.lang.Cloneable, ObjectDuplicable, PktClassifier, java.io.Serializable
- public class SRED
- extends QLogic
- implements PktClassifier
The Stabalized Random Early Detection queue logic.
The codes are ported from Parks'(parks@ee.eng.ohio-state.edu) ns-2 codes,
which were based on T.J. Ott, T.V. Lakshman, L.H. Wong, "SRED: Stabilized RED", IEEE INFOCOM, 1999.
- Version:
- 2.0 03/27/2001, revised and ported to QLogic by Hung-ying Tyan.
- Author:
- Rong Zheng (zhengr@ee.eng.ohio-state.edu)
- See Also:
- Serialized Form
|
Field Summary |
protected boolean |
mark
The mark flag, true for marking CE bit instead of early dropping. |
| Methods inherited from class drcl.comp.queue.QLogic |
dequeueHandler, dropHandler, enqueueHandler, getCapacity, getCurrentQLength, getCurrentQSize, getHost, info, isEmpty, isFull, set, setCapacity, setHost, setQSizePort |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
mark
protected boolean mark
- The mark flag, true for marking CE bit instead of early dropping.
SRED
public SRED()
SRED
public SRED(Component host_)
SRED
public SRED(Component host_,
java.lang.String qpid_)
duplicate
public void duplicate(java.lang.Object source_)
- Description copied from class:
QLogic
- Duplicates the content of the source object to this object.
If the host component is already set, this method also creates
the queue size change event port of the same ID as that in
source_.
Subclasses must call super.duplicate() when
overriding this method.
- Overrides:
duplicate in class QLogic
reset
public void reset()
- Description copied from class:
QLogic
- Resets this object to the initial state.
Subclasses must call
super.reset() when
overriding this method.
- Overrides:
reset in class QLogic
info
public java.lang.String info(java.lang.String prefix_)
- Description copied from class:
QLogic
- Prints the content (states) of this queue management instance.
- Overrides:
info in class QLogic
- Following copied from class:
drcl.comp.queue.QLogic
- Parameters:
prefix_ - prefix of each line in the printout.
adviceOn
public java.lang.String adviceOn(java.lang.Object obj_,
int psize_)
- Description copied from class:
QLogic
- Advices the host component for deciding whether or not
to drop the (arriving) object.
- Overrides:
adviceOn in class QLogic
- Following copied from class:
drcl.comp.queue.QLogic
- Returns:
- the advice; null if advicing not to drop the object.
classify
public int classify(Packet pkt_)
- Description copied from interface:
PktClassifier
- Returns the class the packet belongs to.
- Specified by:
classify in interface PktClassifier
setClassifier
public void setClassifier(PktClassifier c_)
getClassifier
public PktClassifier getClassifier()
setReplaceProb
public void setReplaceProb(double p)
- Sets the replacement probability.
getReplaceProb
public double getReplaceProb()
- Returns the replacement probability.
setSREDMaxProb
public void setSREDMaxProb(double p)
- Sets the maximum dropping probability.
getSREDMaxProb
public double getSREDMaxProb()
- Returns the maximum dropping probability.
setSREDParam
public void setSREDParam(double replacep_,
double maxp_)
setMarkEnabled
public void setMarkEnabled(boolean enabled_)
- If enabled, SRED marks the congestion bit of, instead of advising to drop, packets.
isMarkEnabled
public boolean isMarkEnabled()
setSeed
public void setSeed(long seed_)
getSeed
public long getSeed()
setRandomNumberGenerator
public void setRandomNumberGenerator(RandomNumberGenerator ug_)
setRandomNumberGenerator
public void setRandomNumberGenerator(RandomNumberGenerator ug_,
long seed_)
Copyright © 2001 - DRCL, OSU ~ Back to JavaSim Home ~