Package org.restheart.cache.impl
Class GuavaLoadingCache<K,V>
- java.lang.Object
-
- org.restheart.cache.impl.GuavaLoadingCache<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>,LoadingCache<K,V>
public class GuavaLoadingCache<K,V> extends Object implements LoadingCache<K,V>
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.restheart.cache.Cache
Cache.EXPIRE_POLICY
-
-
Constructor Summary
Constructors Constructor Description GuavaLoadingCache(long size, Cache.EXPIRE_POLICY expirePolicy, long ttl, Function<K,V> loader)
-
-
-
Constructor Detail
-
GuavaLoadingCache
public GuavaLoadingCache(long size, Cache.EXPIRE_POLICY expirePolicy, long ttl, Function<K,V> loader)
-
-
Method Detail
-
getLoading
public Optional<V> getLoading(K key)
- Specified by:
getLoadingin interfaceLoadingCache<K,V>
-
invalidate
public void invalidate(K key)
- Specified by:
invalidatein interfaceCache<K,V>
-
-