Class ConcurrentQueueBlockingImpl<V>
- java.lang.Object
-
- com.sun.corba.ee.impl.transport.concurrent.ConcurrentQueueBlockingImpl<V>
-
- All Implemented Interfaces:
ConcurrentQueue<V>
public class ConcurrentQueueBlockingImpl<V> extends java.lang.Object implements ConcurrentQueue<V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classConcurrentQueueBlockingImpl.Entry<V>private classConcurrentQueueBlockingImpl.HandleImpl<V>-
Nested classes/interfaces inherited from interface com.sun.corba.ee.spi.transport.concurrent.ConcurrentQueue
ConcurrentQueue.Handle<V>
-
-
Constructor Summary
Constructors Constructor Description ConcurrentQueueBlockingImpl(long ttl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConcurrentQueue.Handle<V>offer(V arg)Add a new element to the tail of the queue.ConcurrentQueue.Handle<V>peek()Return the handle for the head of the queue.ConcurrentQueue.Handle<V>poll()Return an element from the head of the queue.intsize()Return the number of elements in the queue.
-
-
-
Field Detail
-
head
final ConcurrentQueueBlockingImpl.Entry<V> head
-
lock
final java.lang.Object lock
-
count
int count
-
ttl
private long ttl
-
-
Method Detail
-
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
public ConcurrentQueue.Handle<V> offer(V arg)
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
public ConcurrentQueue.Handle<V> 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
public ConcurrentQueue.Handle<V> 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
-
-