Class CaffeineCacheProviderFactory<K,V>
java.lang.Object
org.springframework.pulsar.cache.provider.caffeine.CaffeineCacheProviderFactory<K,V>
- Type Parameters:
K
- the type of cache keyV
- the type of cache entries
- All Implemented Interfaces:
CacheProviderFactory<K,
V>
Factory to create instances of
CaffeineCacheProvider
.- Author:
- Chris Bono
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.pulsar.cache.provider.CacheProviderFactory
CacheProviderFactory.EvictionListener<K,
V> -
Constructor Summary
-
Method Summary
-
Constructor Details
-
CaffeineCacheProviderFactory
public CaffeineCacheProviderFactory()
-
-
Method Details
-
create
public CacheProvider<K,V> create(Duration cacheExpireAfterAccess, Long cacheMaximumSize, Integer cacheInitialCapacity, CacheProviderFactory.EvictionListener<K, V> evictionListener) Description copied from interface:CacheProviderFactory
Create a cache provider instance with the specified options.- Specified by:
create
in interfaceCacheProviderFactory<K,
V> - Parameters:
cacheExpireAfterAccess
- time period to expire unused entries in the cachecacheMaximumSize
- maximum size of cache (entries)cacheInitialCapacity
- the initial size of cacheevictionListener
- listener called when an entry is evicted from the cache- Returns:
- cache provider instance
-