org.ehcache.core.spi.cache.tiering
Interface AuthoritativeTier<K,V>
- All Superinterfaces:
- ConfigurationChangeSupport, Store<K,V>
- All Known Implementing Classes:
- AbstractOffHeapStore, OffHeapDiskStore, OffHeapStore
public interface AuthoritativeTier<K,V>
- extends Store<K,V>
Authoritative tier, according to Montreal design.
Methods inherited from interface org.ehcache.core.spi.cache.Store |
bulkCompute, bulkCompute, bulkComputeIfAbsent, clear, compute, compute, computeIfAbsent, computeIfPresent, computeIfPresent, containsKey, get, getStoreEventSource, iterator, put, putIfAbsent, remove, remove, replace, replace |
getAndFault
Store.ValueHolder<V> getAndFault(K key)
throws CacheAccessException
- Marks the mapping as not evictable and returns it atomically.
- Returns:
- the value holder.
- Throws:
CacheAccessException
- if the mapping can't be retrieved or updated.
computeIfAbsentAndFault
Store.ValueHolder<V> computeIfAbsentAndFault(K key,
Function<? super K,? extends V> mappingFunction)
throws CacheAccessException
- Marks the mapping as not evictable and performs computeIfAbsent() atomically.
- Returns:
- the value holder.
- Throws:
CacheAccessException
- if the mapping can't be retrieved or updated.
flush
boolean flush(K key,
Store.ValueHolder<V> valueHolder)
- This marks the entry as evictable again.
The ValueHolder must be an instance returned by the CachingTier.
- Returns:
- 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.
- Throws:
java.lang.IllegalArgumentException
- if the ValueHolder is not an instance from the CachingTier