Package io.quarkus.cache
Interface CaffeineCache
-
- All Superinterfaces:
Cache
- All Known Implementing Classes:
CaffeineCacheImpl
public interface CaffeineCache extends Cache
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> CompletableFuture<V>
getIfPresent(Object key)
Returns the future associated withkey
in this cache, ornull
if there is no cached future forkey
.Set<Object>
keySet()
Returns an unmodifiableSet
view of the keys contained in this cache.-
Methods inherited from interface io.quarkus.cache.Cache
as, get, getDefaultKey, getName, invalidate, invalidateAll
-
-
-
-
Method Detail
-
keySet
Set<Object> keySet()
Returns an unmodifiableSet
view of the keys contained in this cache. If the cache entries are modified while an iteration over the set is in progress, the set will remain unchanged.- Returns:
- a set view of the keys contained in this cache
-
getIfPresent
<V> CompletableFuture<V> getIfPresent(Object key)
Returns the future associated withkey
in this cache, ornull
if there is no cached future forkey
. This method is delegating to theAsyncCache.getIfPresent(Object)
, while recording the cache stats if they are enabled.- Parameters:
key
- key whose associated value is to be returned- Returns:
- the future value to which the specified key is mapped, or
null
if this cache does not contain a mapping for the key - Throws:
NullPointerException
- if the specified key is null- See Also:
AsyncCache.getIfPresent(Object)
-
-