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
-
Method Details
-
size
int size()Returns the queue size- Returns:
- the size
-
remove
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
Add the item to the head of the list.- Parameters:
item- the item to add
-
trim
Attempt to trim the queue. Trim will occur if no other thread is already performing a trim and the queue size is greater than the provided size.- Parameters:
size- the wanted size- Returns:
- the list of evicted items
-