|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConcurrentQueue<V>
A class that provides a very simply unbounded queue. The main requirement here is that the class support constant time (very fast) deletion of arbitrary elements. An instance of this class must be thread safe, either by locking or by using a wait-free algorithm (preferred). The interface is made as simple is possible to make it easier to produce a wait-free implementation.
Nested Class Summary | |
---|---|
static interface |
ConcurrentQueue.Handle<V>
A Handle provides the capability to delete an element of a ConcurrentQueue very quickly. |
Method Summary | |
---|---|
ConcurrentQueue.Handle<V> |
offer(V arg)
Add a new element to the tail of the queue. |
V |
poll()
Return an element from the head of the queue. |
int |
size()
Return the number of elements in the queue. |
Method Detail |
---|
int size()
ConcurrentQueue.Handle<V> offer(V arg)
arg
- element to add to the queue
ConcurrentQueue.Handle
for the element added to the queueV poll()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |