Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the cache by removing all entries.
|
java.util.concurrent.CompletionStage<V> |
getFuture(K key,
org.apache.pekko.japi.Creator<java.util.concurrent.CompletionStage<V>> genValue)
Returns either the cached CompletionStage for the given key or evaluates the given value
generating function producing a `CompletionStage
|
java.util.Set<K> |
getKeys()
Returns the set of keys in the cache, in no particular order Should return in roughly constant
time.
|
java.util.Optional<java.util.concurrent.CompletionStage<V>> |
getOptional(K key)
Retrieves the CompletionStage instance that is currently in the cache for the given key.
|
java.util.concurrent.CompletionStage<V> |
getOrCreateStrict(K key,
org.apache.pekko.japi.Creator<V> block)
Returns either the cached CompletionStage for the given key or the given value as a
CompletionStage
|
java.util.concurrent.CompletionStage<V> |
getOrFulfil(K key,
org.apache.pekko.japi.Procedure<java.util.concurrent.CompletableFuture<V>> f)
Returns either the cached
CompletionStage for the key, or evaluates the given function
which should lead to eventual completion of the completable future. |
void |
remove(K key)
Removes the cache item for the given key.
|
int |
size()
Returns the upper bound for the number of currently cached entries.
|
java.util.concurrent.CompletionStage<V> getFuture(K key, org.apache.pekko.japi.Creator<java.util.concurrent.CompletionStage<V>> genValue)
java.util.concurrent.CompletionStage<V> getOrFulfil(K key, org.apache.pekko.japi.Procedure<java.util.concurrent.CompletableFuture<V>> f)
CompletionStage
for the key, or evaluates the given function
which should lead to eventual completion of the completable future.java.util.concurrent.CompletionStage<V> getOrCreateStrict(K key, org.apache.pekko.japi.Creator<V> block)
java.util.Optional<java.util.concurrent.CompletionStage<V>> getOptional(K key)
void remove(K key)
void clear()
java.util.Set<K> getKeys()
int size()