com.sun.grizzly.connectioncache.impl.concurrent
Class ConcurrentQueueNonBlockingImpl<V>

java.lang.Object
  extended by com.sun.grizzly.connectioncache.impl.concurrent.ConcurrentQueueNonBlockingImpl<V>
All Implemented Interfaces:
ConcurrentQueue<V>

public class ConcurrentQueueNonBlockingImpl<V>
extends Object
implements ConcurrentQueue<V>


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sun.grizzly.connectioncache.spi.concurrent.ConcurrentQueue
ConcurrentQueue.Handle<V>
 
Constructor Summary
ConcurrentQueueNonBlockingImpl()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcurrentQueueNonBlockingImpl

public ConcurrentQueueNonBlockingImpl()
Method Detail

size

public int size()
Description copied from interface: ConcurrentQueue
Return the number of elements in the queue.

Specified by:
size in interface ConcurrentQueue<V>
Returns:
number of elements in the queue

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:
offer in interface ConcurrentQueue<V>
Parameters:
arg - element to add to the queue
Returns:
a Handle for the element added to the queue

poll

public V poll()
Return an element from the head of the queue. The element is removed from the queue.

Specified by:
poll in interface ConcurrentQueue<V>
Returns:
element removed from the queue


Copyright © 2009 SUN Microsystems. All Rights Reserved.