Interface Queue<I extends Item>
-
- All Known Implementing Classes:
SynchronizedQueue
public interface Queue<I extends Item>The queue needed by the concurrent FIFO cache.- Version:
- $Revision$
- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(I item)Add the item to the head of the list.booleanremove(I item)Attempt to remove an item from the queue.intsize()Returns the queue sizeArrayList<I>trim(int size)Attempt to trim the queue.
-
-
-
Method Detail
-
size
int size()
Returns the queue size- Returns:
- the size
-
remove
boolean remove(I item)
Attempt to remove an item from the queue.- Parameters:
item- the item to remove- Returns:
- true if the item was removed by this thread
-
add
void add(I item)
Add the item to the head of the list.- Parameters:
item- the item to add
-
-