Class ConcurrentQueueNonBlockingImpl<V>
java.lang.Object
com.sun.corba.ee.impl.transport.concurrent.ConcurrentQueueNonBlockingImpl<V>
- All Implemented Interfaces:
ConcurrentQueue<V>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classprivate final classNested 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
-
lock
-
count
int count -
ttl
private long ttl
-
-
Constructor Details
-
ConcurrentQueueNonBlockingImpl
public ConcurrentQueueNonBlockingImpl(long ttl)
-
-
Method Details
-
size
public int size()Description copied from interface:ConcurrentQueueReturn the number of elements in the queue.- Specified by:
sizein 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:
offerin 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:
pollin interfaceConcurrentQueue<V>- Returns:
- handle for head of queue
-
peek
Description copied from interface:ConcurrentQueueReturn the handle for the head of the queue. The element is not removed from the queue.- Specified by:
peekin interfaceConcurrentQueue<V>- Returns:
- handle for head of queue
-