Interface CacheEntryLocator<I,V>
- Type Parameters:
I- the identifier type of the located valueV- the located value type
- All Known Subinterfaces:
BiCacheEntryLocator<I,K, V>
public interface CacheEntryLocator<I,V>
Locates a value from a cache.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptiondefault VLocates the value in the cache with the specified identifier.findValueAsync(I id) Locates the value in the cache with the specified identifier.default VReturns the value for the specified key, if possible without contention.default CompletionStage<V> tryValueAsync(I id) Returns the value for the specified key, if possible without contention.
-
Method Details
-
findValue
-
findValueAsync
Locates the value in the cache with the specified identifier.- Parameters:
id- the cache entry identifier- Returns:
- the value of the cache entry, or null if not found.
-
tryValue
-
tryValueAsync
Returns the value for the specified key, if possible without contention.- Parameters:
id- a logical key- Returns:
- the value of the cache entry, or null if not found or unavailable.
-