Package org.wildfly.clustering.cache
Interface Locator<K,V>
- All Known Subinterfaces:
BiLocator<I,K, V>
public interface Locator<K,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(K 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(K id) Returns the value for the specified key, if possible without contention.
-
Method Details
-
findValue
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.
-
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
Returns the value for the specified key, if possible without contention.- Parameters:
key- a cache key- Returns:
- the value of the cache entry, or null if not found or unavailable.
-
tryValueAsync
Returns the value for the specified key, if possible without contention.- Parameters:
key- a cache key- Returns:
- the value of the cache entry, or null if not found or unavailable.
-