| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is a simple class which defines methods which all queues
should implement
Method Summary | |
synchronized void | addItem(Object obj) Adds an object to the queue |
synchronized void | flush() Method to flush the contents of the queue |
synchronized Object | getItem() Get the next message from the queue. |
synchronized Object | getItemWithoutBlocking() Get the next message from the queue. |
synchronized boolean | isEmpty() Method to determine if the queue is empty |
synchronized boolean | isFull() Method to determine if the queue is full |
static void | main(String[] args) Test harness for the various Queue implementations |
int | queueLength() Returns the number of items currently in the queue. |
synchronized void | releaseBlock() Method to release all blocked threads within the queue - once invoked, getItem() will never block again |
Method Detail |
public synchronized void addItem(Object obj)
public synchronized void flush()
public synchronized Object getItem()
public synchronized Object getItemWithoutBlocking()
public synchronized boolean isEmpty()
public synchronized boolean isFull()
public static void main(String[] args)
throws java.lang.Throwable
public int queueLength()
public synchronized void releaseBlock()
Association Links |
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |