K - key typeV - value typeD - value data typepublic interface CacheRemover<K,V,D> extends Invalidate<K>
To make this work, it must be possible to extract
data D out of a value V, and to
reconstruct an identical value V
from D. D must be sufficient to reconstruct an identical
V, and must not contain any references to V.
defaultParallelismThreshold| Modifier and Type | Method and Description |
|---|---|
D |
extract(V value)
Extract data out of
value. |
default void |
invalidate(K key)
Called when a specific entry is invalidated from the cache.
|
default void |
invalidateAll(long parallelismThreshold)
Called when all entries are invalidated from the cache.
|
default void |
invalidateIf(long parallelismThreshold,
Predicate<K> condition)
Called when all entries with keys matching
condition are
invalidated from the cache. |
void |
onRemoval(K key,
D valueData)
Called when an entry is evicted from the cache.
|
CompletableFuture<Void> |
persist(K key,
D valueData)
TODO
|
V |
reconstruct(K key,
D valueData)
Construct a value from its
key and valueData. |
invalidateAll, invalidateIfvoid onRemoval(K key, D valueData)
key - key of the entry to removevalueData - value data of the entry to removeCompletableFuture<Void> persist(K key, D valueData)
key - valueData - D extract(V value)
value. The data must be sufficient to
reconstruct an identical value, and must not contain any references to
value.default void invalidate(K key)
AbstractCache.invalidate(Object).)
If this CacheRemover itself represents a (higher-level) cache,
the entry should be invalidated in this cache as well.
invalidate in interface Invalidate<K>key - key of the entry to removedefault void invalidateIf(long parallelismThreshold,
Predicate<K> condition)
condition are
invalidated from the cache. (See
AbstractCache.invalidateIf(long, Predicate).)
If this CacheRemover itself represents a (higher-level) cache,
the entries should be invalidated in this cache as well.
invalidateIf in interface Invalidate<K>parallelismThreshold - the (estimated) number of entries in the cache needed for this
operation to be executed in parallelcondition - condition on keys of entries to removedefault void invalidateAll(long parallelismThreshold)
AbstractCache.invalidateAll(long).)
If this CacheRemover itself represents a (higher-level) cache,
the entries should be invalidated in this cache as well.
invalidateAll in interface Invalidate<K>parallelismThreshold - the (estimated) number of entries in the cache needed for this
operation to be executed in parallelCopyright © 2015–2022 ImgLib2. All rights reserved.