K - the type of the cache keyV - the type of the cache valuepublic interface ReadThroughCache<K,V>
| Modifier and Type | Method and Description |
|---|---|
default V |
get(K cacheKey,
Supplier<V> delegateLoader)
Retrieve the value for the given key.
|
V |
get(K cacheKey,
Supplier<V> delegateLoader,
Predicate<V> valueTester)
Retrieve the value for the given key.
|
Map<K,V> |
getBulk(Set<K> cacheKeys,
Function<Set<K>,Map<K,V>> delegateLoader)
Retrieves multiple values for the given keys.
|
void |
remove(K cacheKey)
Removs the cache entry for the given key.
|
void |
removeAll()
Removes all cache entries.
|
default V get(K cacheKey, Supplier<V> delegateLoader)
Optional.empty() will be returned.cacheKey - the key to resolve in the cachedelegateLoader - A Supplier which will be called if there is no value in the cache (may return null).V get(K cacheKey, Supplier<V> delegateLoader, Predicate<V> valueTester)
cacheKey - the key to resolve in the cachedelegateLoader - A Supplier which will be called if there is no value in the cache (may return null).valueTester - A Predicate that will be used to test the validity of any value in the cache or loaded from the supplierMap<K,V> getBulk(Set<K> cacheKeys, Function<Set<K>,Map<K,V>> delegateLoader)
void remove(K cacheKey)
void removeAll()
Copyright © 2003–2021 Atlassian. All rights reserved.