com.caucho.util
Class RingValueQueue2<T>

java.lang.Object
  extended by com.caucho.util.RingValueQueue2<T>

public final class RingValueQueue2<T>
extends java.lang.Object


Constructor Summary
RingValueQueue2(int capacity)
           
 
Method Summary
 long getHead()
           
 long getHeadAlloc()
           
 int getSize()
           
 long getTail()
           
 long getTailAlloc()
           
 T getValue(long index)
           
 boolean isEmpty()
           
 long nextIndex(long index)
           
 boolean offer(T value)
           
 boolean offer(T value, long expireTime)
           
 T peek()
           
 T poll()
           
 long prevIndex(long index)
           
 boolean put(T value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RingValueQueue2

public RingValueQueue2(int capacity)
Method Detail

isEmpty

public final boolean isEmpty()

getSize

public final int getSize()

getHead

public final long getHead()

getHeadAlloc

public final long getHeadAlloc()

getTail

public final long getTail()

getTailAlloc

public final long getTailAlloc()

offer

public final boolean offer(T value)

put

public final boolean put(T value)

offer

public final boolean offer(T value,
                           long expireTime)

peek

public final T peek()

poll

public final T poll()

getValue

public T getValue(long index)

nextIndex

public final long nextIndex(long index)

prevIndex

public long prevIndex(long index)