K - the key typeV - the value typepublic interface AuthoritativeTier<K,V> extends Store<K,V>
By design this tier will always hold all the mappings contained in the Cache
| Modifier and Type | Interface and Description |
|---|---|
static interface |
AuthoritativeTier.InvalidationValve
Invalidation valve, that is the mechanism through which an
AuthoritativeTier can request invalidations
from the CachingTier. |
static interface |
AuthoritativeTier.Provider
Service interface for providing AuthoritativeTier instances. |
Store.Configuration<K,V>, Store.ElementalProvider, Store.Iterator<T>, Store.PutStatus, Store.RemoveStatus, Store.ReplaceStatus, Store.ValueHolder<V>| Modifier and Type | Method and Description |
|---|---|
java.lang.Iterable<? extends java.util.Map.Entry<? extends K,? extends Store.ValueHolder<V>>> |
bulkComputeIfAbsentAndFault(java.lang.Iterable<? extends K> keys,
java.util.function.Function<java.lang.Iterable<? extends K>,java.lang.Iterable<? extends java.util.Map.Entry<? extends K,? extends V>>> mappingFunction)
Bulk method to compute a value for every key passed in the
Iterable keys argument using the mappingFunction
to compute the value. |
Store.ValueHolder<V> |
computeIfAbsentAndFault(K key,
java.util.function.Function<? super K,? extends V> mappingFunction)
Marks the mapping as not evictable and performs computeIfAbsent() atomically.
|
boolean |
flush(K key,
Store.ValueHolder<V> valueHolder)
This marks a mapping as evictable again if it matches the
Store.ValueHolder
received. |
Store.ValueHolder<V> |
getAndFault(K key)
Marks the mapping as not evictable and returns it atomically.
|
void |
setInvalidationValve(AuthoritativeTier.InvalidationValve valve)
Sets the
AuthoritativeTier.InvalidationValve to be used by this AuthoritativeTier. |
bulkCompute, bulkCompute, bulkComputeIfAbsent, clear, computeAndGet, computeIfAbsent, containsKey, get, getAndCompute, getAndPut, getAndRemove, getStoreEventSource, iterator, put, putIfAbsent, remove, remove, replace, replacegetConfigurationChangeListenersStore.ValueHolder<V> getAndFault(K key) throws org.ehcache.spi.resilience.StoreAccessException
org.ehcache.spi.resilience.StoreAccessException - if the mapping can't be retrieved or updated.Store.ValueHolder<V> computeIfAbsentAndFault(K key, java.util.function.Function<? super K,? extends V> mappingFunction) throws org.ehcache.spi.resilience.StoreAccessException
org.ehcache.spi.resilience.StoreAccessException - if the mapping can't be retrieved or updated.boolean flush(K key, Store.ValueHolder<V> valueHolder)
Store.ValueHolder
received.true if a mapping exists for that key, the mapping was faulted, and the value of the
ValueHolder is equal to the value of the mapping in the AuthoritativeTier, false otherwisejava.lang.IllegalArgumentException - if the ValueHolder is not an instance from the CachingTiervoid setInvalidationValve(AuthoritativeTier.InvalidationValve valve)
AuthoritativeTier.InvalidationValve to be used by this AuthoritativeTier.
The invalidation valve provides a way for the AuthoritativeTier to force invalidation of
CachingTier entries when that is required.
valve - the valve to use for triggering invalidationsjava.lang.Iterable<? extends java.util.Map.Entry<? extends K,? extends Store.ValueHolder<V>>> bulkComputeIfAbsentAndFault(java.lang.Iterable<? extends K> keys, java.util.function.Function<java.lang.Iterable<? extends K>,java.lang.Iterable<? extends java.util.Map.Entry<? extends K,? extends V>>> mappingFunction) throws org.ehcache.spi.resilience.StoreAccessException
Iterable keys argument using the mappingFunction
to compute the value.
The function takes an Iterable of Map.Entry key/value pairs, where each entry's value is its currently stored value
for each key that is not mapped in the store. It is expected that the function should return an Iterable of Map.Entry
key/value pairs containing an entry for each key that was passed to it.
Note: This method guarantees atomicity of computations for each individual key in keys. Implementations may choose to provide coarser grained atomicity.
keys - the keys to compute a new value for, if they're not in the store.mappingFunction - the function that generates new values.Map of key/value pairs for each key in keys to the previously missing value.org.ehcache.spi.resilience.StoreAccessException - when a failure occurs when accessing the store