|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.zig_project.gpl.common.queue.LinearDispatchQueue
Thread-safe module for dispatching Objects.
| Constructor Summary | |
LinearDispatchQueue(LinearOrderedQueue q)
|
|
LinearDispatchQueue(LinearQueue q)
|
|
| Method Summary | |
void |
add(Object o)
Adds a single Object to the Queue. |
void |
addSet(Enumeration e)
Adds an entire Enumeration of elements to the Queue. |
void |
clear()
Empties the Queue. |
boolean |
contains(Object o)
Determines if the Queue contains a copy of the specified Object. |
Enumeration |
elements()
Retrieves an enumerable form of the elements in the Queue. |
boolean |
isEmpty()
Determines if the Queue is empty. |
boolean |
isSealed()
Determines if the Queue is sealed. |
Object |
peekNext()
Retrieves the next Object from the queue without removing it. |
Object |
remove(Object o)
Removes the first found element that is equal to o from the queue. |
Object |
removeNext()
Removes the next element from the Queue. |
void |
seal()
Seals the Queue. |
boolean |
transferTo(Object o,
GenericBlockingQueue q)
Transfers an Object, if it exists, out of this Queue and into another. |
void |
unseal()
Unseals the Queue. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LinearDispatchQueue(LinearOrderedQueue q)
public LinearDispatchQueue(LinearQueue q)
| Method Detail |
public void add(Object o)
add in interface GenericBlockingQueueo - the Object to be added
SealedQueueException - if the Queue is currently sealedpublic void addSet(Enumeration e)
addSet in interface GenericBlockingQueuee - a enumerable set of elements
SealedQueueException - if the Queue is currently sealedpublic boolean isEmpty()
Queue
isEmpty in interface Queuepublic Object remove(Object o)
Queue
remove in interface Queueo - a copy of the Object to be removed
public Object peekNext()
OrderedBlockingQueue
peekNext in interface OrderedBlockingQueuepublic boolean contains(Object o)
Queue
contains in interface Queueo - an Object to look for copies of
public Enumeration elements()
elements in interface Queue
public boolean transferTo(Object o,
GenericBlockingQueue q)
GenericBlockingQueue
transferTo in interface GenericBlockingQueueo - a copy of the Object to transferq - the Queue to transfer the copy to
public Object removeNext()
throws InterruptedException
removeNext in interface OrderedBlockingQueueInterruptedException - if the current thread is interrupted
while waiting for an element to become availablepublic boolean isSealed()
SealableQueue
isSealed in interface SealableQueuepublic void seal()
SealableQueue
seal in interface SealableQueuepublic void unseal()
SealableQueueThis method is provided as it improves flexibility with a minimum if additional difficulty. That is, reliance on this method may not be a good design. For example, if another thread is currently blocking in a remove operation, no guarantees are made that it will return immediately if the Queue is quickly sealed and then unsealed.
unseal in interface SealableQueuepublic void clear()
Queue
clear in interface Queue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||