public class RingQueue<T extends RingItem>
extends java.lang.Object
Constructor and Description |
---|
RingQueue(int capacity,
RingItemFactory<T> itemFactory) |
Modifier and Type | Method and Description |
---|---|
T |
beginOffer(boolean isWait) |
T |
beginPoll() |
void |
completeOffer(T item) |
void |
completePoll(T item) |
int |
getHead() |
int |
getHeadAlloc() |
int |
getSize() |
int |
getTail() |
int |
getTailAlloc() |
boolean |
isEmpty() |
public RingQueue(int capacity, RingItemFactory<T> itemFactory)
public boolean isEmpty()
public int getSize()
public int getHead()
public int getHeadAlloc()
public int getTail()
public int getTailAlloc()
public final T beginOffer(boolean isWait)
public final void completeOffer(T item)
public final T beginPoll()
public final void completePoll(T item)