Package org.restheart.cache.impl
Class CaffeineCache<K,V>
java.lang.Object
org.restheart.cache.impl.CaffeineCache<K,V>
- Type Parameters:
K
- the class of the keys.V
- the class of the values (is Optional-ized).
- All Implemented Interfaces:
Cache<K,
V>
- Author:
- Andrea Di Cesare <[email protected]>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.restheart.cache.Cache
Cache.EXPIRE_POLICY
-
Constructor Summary
ConstructorsConstructorDescriptionCaffeineCache
(long size, Cache.EXPIRE_POLICY expirePolicy, long ttl) CaffeineCache
(long size, Cache.EXPIRE_POLICY expirePolicy, long ttl, Consumer<Map.Entry<K, Optional<V>>> remover) -
Method Summary
-
Constructor Details
-
CaffeineCache
-
CaffeineCache
-
-
Method Details
-
get
-
remove
-
put
-
invalidate
- Specified by:
invalidate
in interfaceCache<K,
V>
-
invalidateAll
public void invalidateAll()- Specified by:
invalidateAll
in interfaceCache<K,
V>
-
asMap
-
cleanUp
public void cleanUp()Description copied from interface:Cache
Performs any pending maintenance operations needed by the cache.
-