|
DRCL J-Sim 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.inet.core.queue.FIFO
Implements a FIFO queue structure that one may plug in a different queue
logic to form a differnt FIFO implementation. For example, one may plug in
the RED queue logic to form a random-early-detection (RED) queue;
plug in the FRED queue logic to form a fair RED (FRED) queue;
plug in the SRED queue logic to form a stablized RED (SRED) queue.
Without any queue logic, this component works as a simple drop-tail
(by default) or drop-head queue.
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
static java.lang.String |
EVENT_QSIZE_PORT_ID
Name of the port that exports the instant queue size change events. |
| Fields inherited from class drcl.comp.queue.ActiveQueue |
OUTPUT_PORT_ID |
| Fields inherited from interface drcl.inet.core.InetCoreConstants |
CONFIG_PORT_ID, PULL_PORT_ID |
| Constructor Summary | |
FIFO()
|
|
FIFO(java.lang.String id_)
|
|
| Method Summary | |
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. |
QLogic |
getQLogic()
|
int |
getSize()
Returns the current size of the queue. |
java.lang.String |
info(java.lang.String prefix_)
|
boolean |
isDropHeadEnabled()
|
boolean |
isEmpty()
Return true if the queue is empty. |
boolean |
isFull()
Return true if the queue is full. |
java.lang.Object |
lastElement()
Retrieves but not remove the last object in the queue. |
java.lang.Object |
peekAt(int pos_)
Retrieves but not remove the object at the position specified. |
void |
reset()
Resets the component for being used anew. |
void |
setCapacity(int capacity_)
Sets the capacity of the queue. |
void |
setDropHeadEnabled(boolean enabled_)
|
void |
setQLogic(QLogic qlogic_)
|
| Methods inherited from class drcl.inet.core.Queue |
getMode, setMode |
| Methods inherited from class drcl.comp.queue.ActiveQueue |
enqueueAt, getAvailableSize, increaseEnqueCount, info, retrieveAt |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String EVENT_QSIZE_PORT_ID
| Constructor Detail |
public FIFO()
public FIFO(java.lang.String id_)
| Method Detail |
public void reset()
Component
reset in class Queuepublic void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class Queuepublic java.lang.String info(java.lang.String prefix_)
info in class Queuepublic void setQLogic(QLogic qlogic_)
public QLogic getQLogic()
public java.lang.Object enqueue(java.lang.Object obj_)
enqueue in class ActiveQueuepublic java.lang.Object dequeue()
dequeue in class ActiveQueuepublic java.lang.Object peekAt(int pos_)
peekAt in class ActiveQueuepublic java.lang.Object firstElement()
firstElement in class ActiveQueuepublic java.lang.Object lastElement()
lastElement in class ActiveQueuepublic boolean isFull()
isFull in class ActiveQueuepublic boolean isEmpty()
isEmpty in class ActiveQueuepublic void setCapacity(int capacity_)
setCapacity in class Queuecapacity_ - the new capacity.public int getCapacity()
getCapacity in class Queuepublic int getSize()
getSize in class Queuepublic void setDropHeadEnabled(boolean enabled_)
public boolean isDropHeadEnabled()
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||