public final class LRUCacheFactory extends Object
LRUCache
instances.Modifier and Type | Method and Description |
---|---|
static LRUCache |
newLRUCache(int maximumCacheSize)
Constructs an empty LRUCache instance with the
specified maximumCacheSize, and will stop on eviction.
|
static LRUCache |
newLRUCache(int initialCapacity,
int maximumCacheSize)
Constructs an empty LRUCache instance with the
specified initial capacity, maximumCacheSize, and will stop on eviction.
|
static LRUCache |
newLRUCache(int initialCapacity,
int maximumCacheSize,
boolean stopOnEviction)
Constructs an empty LRUCache instance with the
specified initial capacity, maximumCacheSize,load factor and ordering mode.
|
static LRUSoftCache |
newLRUSoftCache(int maximumCacheSize)
Constructs an empty LRUSoftCache instance with the
specified maximumCacheSize, and will stop on eviction.
|
static LRUWeakCache |
newLRUWeakCache(int maximumCacheSize)
Constructs an empty LRUWeakCache instance with the
specified maximumCacheSize, and will stop on eviction.
|
static void |
warmUp()
Warm-up the LRUCache to startup Apache Camel faster.
|
public static void warmUp()
public static LRUCache newLRUCache(int maximumCacheSize)
maximumCacheSize
- the max capacity.IllegalArgumentException
- if the initial capacity is negativepublic static LRUCache newLRUCache(int initialCapacity, int maximumCacheSize)
initialCapacity
- the initial capacity.maximumCacheSize
- the max capacity.IllegalArgumentException
- if the initial capacity is negativepublic static LRUCache newLRUCache(int initialCapacity, int maximumCacheSize, boolean stopOnEviction)
initialCapacity
- the initial capacity.maximumCacheSize
- the max capacity.stopOnEviction
- whether to stop service on eviction.IllegalArgumentException
- if the initial capacity is negativepublic static LRUSoftCache newLRUSoftCache(int maximumCacheSize)
maximumCacheSize
- the max capacity.IllegalArgumentException
- if the initial capacity is negativepublic static LRUWeakCache newLRUWeakCache(int maximumCacheSize)
maximumCacheSize
- the max capacity.IllegalArgumentException
- if the initial capacity is negativeApache Camel