Class ConcurrentQueueImpl<V>
java.lang.Object
com.sun.corba.ee.impl.transport.concurrent.ConcurrentQueueImpl<V>
- All Implemented Interfaces:
ConcurrentQueue<V>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
private final class
Nested classes/interfaces inherited from interface com.sun.corba.ee.spi.transport.concurrent.ConcurrentQueue
ConcurrentQueue.Handle<V>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
head
-
count
int count -
ttl
private long ttl
-
-
Constructor Details
-
ConcurrentQueueImpl
public ConcurrentQueueImpl(long ttl)
-
-
Method Details
-
size
public int size()Description copied from interface:ConcurrentQueue
Return the number of elements in the queue.- Specified by:
size
in interfaceConcurrentQueue<V>
- Returns:
- the number of elements
-
offer
Add a new element to the tail of the queue. Returns a handle for the element in the queue.- Specified by:
offer
in interfaceConcurrentQueue<V>
- Parameters:
arg
- element to add- Returns:
- handle for element
-
poll
Return an element from the head of the queue. The element is removed from the queue.- Specified by:
poll
in interfaceConcurrentQueue<V>
- Returns:
- handle for head of queue
-
peek
Description copied from interface:ConcurrentQueue
Return the handle for the head of the queue. The element is not removed from the queue.- Specified by:
peek
in interfaceConcurrentQueue<V>
- Returns:
- handle for head of queue
-