|
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
An ActiveQueue is a queue and it is designed to interact with
a data pulling component.
It accepts a null signal from the data pulling component
which triggers a dequeue and the dequeued data is sent at the
output@ port. If the queue is empty, this component remembers
that the pulling component is available for receiving data, and when new data
arrives, this component actively sends out the data at the
output@ port without the pulling component having to do
the pulling again.
Multiple pullings when the queue is empty results in only one time of
active sending.
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
static java.lang.String |
OUTPUT_PORT_ID
|
| Constructor Summary | |
ActiveQueue()
|
|
ActiveQueue(java.lang.String id_)
|
|
| Method Summary | |
abstract java.lang.Object |
dequeue()
Dequeues and returns the first object in the queue. |
abstract java.lang.Object |
enqueue(java.lang.Object obj_)
Enqueues the object at the end of the queue |
java.lang.Object |
enqueueAt(java.lang.Object obj_,
int pos_)
Enqueues the object at the position specified. |
java.lang.Object |
firstElement()
Retrieves but not dequeue the first object in the queue. |
int |
getAvailableSize()
Returns the available size of the queue. |
abstract int |
getCapacity()
Returns the capacity of the queue. |
abstract int |
getSize()
Returns the current size of the queue. |
void |
increaseEnqueCount()
Increases the enqueue counter, for diagnosis purpose. |
java.lang.String |
info()
Returns information regarding this component. |
java.lang.String |
info(java.lang.String prefix_)
|
abstract boolean |
isEmpty()
Return true if the queue is empty. |
abstract 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 dequeue the object at the position specified. |
void |
reset()
Resets the component for being used anew. |
java.lang.Object |
retrieveAt(int pos_)
Dequeues the object at the position specified. |
abstract void |
setCapacity(int capacity_)
Sets the capacity of the queue. |
| 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 OUTPUT_PORT_ID
| Constructor Detail |
public ActiveQueue()
public ActiveQueue(java.lang.String id_)
| Method Detail |
public void reset()
Component
reset in class Componentpublic java.lang.String info()
Component
info in class Componentpublic java.lang.String info(java.lang.String prefix_)
public final void increaseEnqueCount()
public abstract java.lang.Object enqueue(java.lang.Object obj_)
public java.lang.Object enqueueAt(java.lang.Object obj_,
int pos_)
public abstract java.lang.Object dequeue()
public java.lang.Object retrieveAt(int pos_)
public java.lang.Object peekAt(int pos_)
public java.lang.Object firstElement()
public java.lang.Object lastElement()
public abstract boolean isFull()
public abstract boolean isEmpty()
public abstract void setCapacity(int capacity_)
public abstract int getCapacity()
public abstract int getSize()
public int getAvailableSize()
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||