Class CaffeineLRUCacheFactory
- java.lang.Object
-
- org.apache.camel.support.LRUCacheFactory
-
- org.apache.camel.component.caffeine.lrucache.CaffeineLRUCacheFactory
-
@Deprecated @JdkService("lru-cache-factory") public final class CaffeineLRUCacheFactory extends org.apache.camel.support.LRUCacheFactory
Deprecated.Factory to createCaffeineLRUCache
instances.
-
-
Constructor Summary
Constructors Constructor Description CaffeineLRUCacheFactory()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <K,V>
Map<K,V>createLRUCache(int maximumCacheSize)
Deprecated.Constructs an empty LRUCache instance with the specified maximumCacheSize, and will stop on eviction.<K,V>
Map<K,V>createLRUCache(int initialCapacity, int maximumCacheSize)
Deprecated.Constructs an empty LRUCache instance with the specified initial capacity, maximumCacheSize, and will stop on eviction.<K,V>
Map<K,V>createLRUCache(int initialCapacity, int maximumCacheSize, boolean stopOnEviction)
Deprecated.Constructs an empty LRUCache instance with the specified initial capacity, maximumCacheSize,load factor and ordering mode.<K,V>
Map<K,V>createLRUCache(int maximumCacheSize, Consumer<V> onEvict)
Deprecated.Constructs an empty LRUCache instance with the specified maximumCacheSize, and will stop on eviction.<K,V>
Map<K,V>createLRUSoftCache(int maximumCacheSize)
Deprecated.Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.<K,V>
Map<K,V>createLRUSoftCache(int initialCapacity, int maximumCacheSize)
Deprecated.Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.<K,V>
Map<K,V>createLRUSoftCache(int initialCapacity, int maximumCacheSize, boolean stopOnEviction)
Deprecated.Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.<K,V>
Map<K,V>createLRUWeakCache(int maximumCacheSize)
Deprecated.Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.<K,V>
Map<K,V>createLRUWeakCache(int initialCapacity, int maximumCacheSize)
Deprecated.Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.<K,V>
Map<K,V>createLRUWeakCache(int initialCapacity, int maximumCacheSize, boolean stopOnEviction)
Deprecated.Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.String
toString()
Deprecated.static void
warmUp()
Deprecated.Warm-up the LRUCache to startup Apache Camel faster.
-
-
-
Method Detail
-
warmUp
public static void warmUp()
Deprecated.Warm-up the LRUCache to startup Apache Camel faster.
-
createLRUCache
public <K,V> Map<K,V> createLRUCache(int maximumCacheSize)
Deprecated.Constructs an empty LRUCache instance with the specified maximumCacheSize, and will stop on eviction.- Specified by:
createLRUCache
in classorg.apache.camel.support.LRUCacheFactory
- Parameters:
maximumCacheSize
- the max capacity.- Throws:
IllegalArgumentException
- if the initial capacity is negative
-
createLRUCache
public <K,V> Map<K,V> createLRUCache(int maximumCacheSize, Consumer<V> onEvict)
Deprecated.Constructs an empty LRUCache instance with the specified maximumCacheSize, and will stop on eviction.- Specified by:
createLRUCache
in classorg.apache.camel.support.LRUCacheFactory
- Parameters:
maximumCacheSize
- the max capacity.- Throws:
IllegalArgumentException
- if the initial capacity is negative
-
createLRUCache
public <K,V> Map<K,V> createLRUCache(int initialCapacity, int maximumCacheSize)
Deprecated.Constructs an empty LRUCache instance with the specified initial capacity, maximumCacheSize, and will stop on eviction.- Specified by:
createLRUCache
in classorg.apache.camel.support.LRUCacheFactory
- Parameters:
initialCapacity
- the initial capacity.maximumCacheSize
- the max capacity.- Throws:
IllegalArgumentException
- if the initial capacity is negative
-
createLRUCache
public <K,V> Map<K,V> createLRUCache(int initialCapacity, int maximumCacheSize, boolean stopOnEviction)
Deprecated.Constructs an empty LRUCache instance with the specified initial capacity, maximumCacheSize,load factor and ordering mode.- Specified by:
createLRUCache
in classorg.apache.camel.support.LRUCacheFactory
- Parameters:
initialCapacity
- the initial capacity.maximumCacheSize
- the max capacity.stopOnEviction
- whether to stop service on eviction.- Throws:
IllegalArgumentException
- if the initial capacity is negative
-
createLRUSoftCache
public <K,V> Map<K,V> createLRUSoftCache(int maximumCacheSize)
Deprecated.Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.- Specified by:
createLRUSoftCache
in classorg.apache.camel.support.LRUCacheFactory
- Parameters:
maximumCacheSize
- the max capacity.- Throws:
IllegalArgumentException
- if the initial capacity is negative
-
createLRUSoftCache
public <K,V> Map<K,V> createLRUSoftCache(int initialCapacity, int maximumCacheSize)
Deprecated.Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.- Specified by:
createLRUSoftCache
in classorg.apache.camel.support.LRUCacheFactory
- Parameters:
initialCapacity
- the initial capacity.maximumCacheSize
- the max capacity.- Throws:
IllegalArgumentException
- if the initial capacity is negative
-
createLRUSoftCache
public <K,V> Map<K,V> createLRUSoftCache(int initialCapacity, int maximumCacheSize, boolean stopOnEviction)
Deprecated.Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.- Specified by:
createLRUSoftCache
in classorg.apache.camel.support.LRUCacheFactory
- Parameters:
initialCapacity
- the initial capacity.maximumCacheSize
- the max capacity.stopOnEviction
- whether to stop service on eviction.- Throws:
IllegalArgumentException
- if the initial capacity is negative
-
createLRUWeakCache
public <K,V> Map<K,V> createLRUWeakCache(int maximumCacheSize)
Deprecated.Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.- Specified by:
createLRUWeakCache
in classorg.apache.camel.support.LRUCacheFactory
- Parameters:
maximumCacheSize
- the max capacity.- Throws:
IllegalArgumentException
- if the initial capacity is negative
-
createLRUWeakCache
public <K,V> Map<K,V> createLRUWeakCache(int initialCapacity, int maximumCacheSize)
Deprecated.Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.- Specified by:
createLRUWeakCache
in classorg.apache.camel.support.LRUCacheFactory
- Parameters:
initialCapacity
- the initial capacity.maximumCacheSize
- the max capacity.- Throws:
IllegalArgumentException
- if the initial capacity is negative
-
createLRUWeakCache
public <K,V> Map<K,V> createLRUWeakCache(int initialCapacity, int maximumCacheSize, boolean stopOnEviction)
Deprecated.Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.- Specified by:
createLRUWeakCache
in classorg.apache.camel.support.LRUCacheFactory
- Parameters:
initialCapacity
- the initial capacity.maximumCacheSize
- the max capacity.stopOnEviction
- whether to stop service on eviction.- Throws:
IllegalArgumentException
- if the initial capacity is negative
-
-