com.caucho.util
Class RingValueQueue<T>

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

public class RingValueQueue<T>
extends java.lang.Object


Constructor Summary
RingValueQueue(int capacity)
           
 
Method Summary
 int getCapacity()
           
 int getHead()
           
 int getHeadAlloc()
           
 int getSize()
           
 int getTail()
           
 int getTailAlloc()
           
 T getValue(int index)
           
 boolean isEmpty()
           
 int nextIndex(int index)
           
 boolean offer(T value)
           
 boolean offer(T value, long expireTime)
           
 T peek()
           
 T poll()
           
 int prevIndex(int 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

RingValueQueue

public RingValueQueue(int capacity)
Method Detail

isEmpty

public final boolean isEmpty()

getSize

public final int getSize()

getCapacity

public final int getCapacity()

getHead

public final int getHead()

getHeadAlloc

public final int getHeadAlloc()

getTail

public final int getTail()

getTailAlloc

public final int 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(int index)

nextIndex

public int nextIndex(int index)

prevIndex

public int prevIndex(int index)