|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.util.CircularLossyQueue<T>
T
- Type of the item's to add in this queuepublic class CircularLossyQueue<T>
An implementation of a CircularQueue data-structure. When the number of items added exceeds the maximum capacity, items that were added first are lost.
Constructor Summary | |
---|---|
CircularLossyQueue(int size)
Constructs the circular queue with the specified capacity |
Method Summary | |
---|---|
int |
depth()
Returns the number of items currently in the queue |
boolean |
isEmtpy()
Returns true if the queue is empty, otherwise false |
T |
peek()
Returns value at the tail of the queue |
void |
push(T newVal)
Adds a new item |
T[] |
toArray(T[] type)
Returns an array of the current elements in the queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CircularLossyQueue(int size)
size
- Method Detail |
---|
public void push(T newVal)
newVal
- public T[] toArray(T[] type)
type
-
public T peek()
public boolean isEmtpy()
public int depth()
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |