Class ConcurrentQueueNonBlockingImpl<V>

java.lang.Object
com.sun.corba.ee.impl.transport.concurrent.ConcurrentQueueNonBlockingImpl<V>
All Implemented Interfaces:
ConcurrentQueue<V>

public class ConcurrentQueueNonBlockingImpl<V> extends Object implements ConcurrentQueue<V>
  • Field Details

  • Constructor Details

    • ConcurrentQueueNonBlockingImpl

      public ConcurrentQueueNonBlockingImpl(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 interface ConcurrentQueue<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:
      offer in interface ConcurrentQueue<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:
      poll in interface ConcurrentQueue<V>
      Returns:
      handle for head of queue
    • peek

      public ConcurrentQueue.Handle<V> 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 interface ConcurrentQueue<V>
      Returns:
      handle for head of queue