org.apache.activemq.util
K
- V
- public class LRUSet<E> extends java.util.AbstractSet<E> implements java.util.Set<E>, java.lang.Cloneable, java.io.Serializable
Constructor and Description |
---|
LRUSet()
Default constructor for an LRU Cache The default capacity is 10000
|
LRUSet(int maximumCacheSize)
Constructs a LRUCache with a maximum capacity
|
LRUSet(int initialCapacity,
int maximumCacheSize,
float loadFactor,
boolean accessOrder)
Constructs an empty LRUCache instance with the specified
initial capacity, maximumCacheSize,load factor and ordering mode.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
boolean |
remove(java.lang.Object o) |
int |
size() |
addAll, containsAll, retainAll, toArray, toArray, toString
public LRUSet()
public LRUSet(int maximumCacheSize)
maximumCacheSize
- public LRUSet(int initialCapacity, int maximumCacheSize, float loadFactor, boolean accessOrder)
initialCapacity
- the initial capacity.maximumCacheSize
- loadFactor
- the load factor.accessOrder
- the ordering mode - true for access-order,
false for insertion-order.java.lang.IllegalArgumentException
- if the initial capacity is negative or the load factor is
non-positive.Copyright © 2005-2014. All Rights Reserved.