|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.comp.queue.ActiveQueue
drcl.inet.core.Queue
drcl.diffserv.HQS
This component defines the base class for a hierachical queue set.
Propertes:
classIDMask: TOS mask for classifying incoming packets
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
protected long |
classIDMask
|
protected Map |
qs
|
| Fields inherited from class drcl.comp.queue.ActiveQueue |
nrequests, outport, OUTPUT_PORT_ID |
| Fields inherited from interface drcl.inet.core.InetCoreConstants |
CONFIG_PORT_ID, PULL_PORT_ID |
| Constructor Summary | |
HQS()
|
|
HQS(java.lang.String id)
|
|
| Method Summary | |
void |
addQueueSet(Queue child_,
long classMask,
long classId)
|
protected java.lang.String |
configInfo(java.lang.String prefix_)
Prints the configuration information of this HQS. |
protected java.lang.String |
configInfo(java.lang.String prefix_,
Queue q_)
Prints out the configuration information associated with the child queue. |
java.lang.Object |
dequeue()
Dequeues and returns the first object in the queue. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
java.lang.Object |
enqueue(java.lang.Object obj_)
Enqueues the object at the end of the queue |
java.lang.Object |
firstElement()
Retrieves but not dequeue the first object in the queue. |
int |
getCapacity()
Returns the capacity of the queue. |
long |
getClassIDMask()
|
Queue |
getQueueSet(long classID)
|
int |
getSize()
Returns the current size of the queue. |
java.lang.String |
info(java.lang.String prefix_)
|
boolean |
isEmpty()
Return true if the queue is empty. |
boolean |
isFull()
Return true if the queue is full. |
protected abstract Queue |
pickEligibleQueue(boolean dequeue_)
This method is called when this HQS needs to pick a child queue to perform dequeue() or firstElement(). |
void |
removeQueueSet(Queue leaf_)
|
void |
setCapacity(int size)
Not applicable to this class. |
void |
setClassIDMask(long mask_)
|
| Methods inherited from class drcl.inet.core.Queue |
createConfigPort, getMode, isByteMode, isPacketMode, reset, setMode |
| Methods inherited from class drcl.comp.queue.ActiveQueue |
_getnrequests, _setnrequests, enqueueAt, getAvailableSize, getEnqueCount, increaseEnqueCount, info, lastElement, peekAt, process, pull, retrieveAt |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Map qs
protected long classIDMask
| Constructor Detail |
public HQS()
public HQS(java.lang.String id)
| Method Detail |
public void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class Queueprotected java.lang.String configInfo(java.lang.String prefix_)
protected java.lang.String configInfo(java.lang.String prefix_,
Queue q_)
public java.lang.String info(java.lang.String prefix_)
info in class Queuepublic java.lang.Object enqueue(java.lang.Object obj_)
ActiveQueue
enqueue in class ActiveQueuepublic java.lang.Object dequeue()
ActiveQueue
dequeue in class ActiveQueuepublic java.lang.Object firstElement()
ActiveQueue
firstElement in class ActiveQueue
public void addQueueSet(Queue child_,
long classMask,
long classId)
public Queue getQueueSet(long classID)
public void removeQueueSet(Queue leaf_)
protected abstract Queue pickEligibleQueue(boolean dequeue_)
public void setClassIDMask(long mask_)
public long getClassIDMask()
public boolean isEmpty()
ActiveQueue
isEmpty in class ActiveQueuepublic boolean isFull()
ActiveQueue
isFull in class ActiveQueuepublic int getSize()
Queue
getSize in class Queuepublic int getCapacity()
Queue
getCapacity in class Queuepublic void setCapacity(int size)
setCapacity in class Queuesize - the new capacity.
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||