|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CachingTier<K,V>
Caching tier, according to Montreal design.
| Nested Class Summary | |
|---|---|
static interface |
CachingTier.InvalidationListener<K,V>
Caching tier invalidation listener. |
static interface |
CachingTier.Provider
|
| Method Summary | |
|---|---|
void |
clear()
Empty out the caching store. |
Store.ValueHolder<V> |
getOrComputeIfAbsent(K key,
Function<K,Store.ValueHolder<V>> source)
Either return the value holder currently in the caching tier, or compute and store it when it isn't present. |
void |
invalidate(K key)
Remove a mapping. |
void |
invalidate(K key,
NullaryFunction<K> function)
Remove a mapping, then call a function under the same lock scope irrespectively of a mapping being there or not. |
void |
setInvalidationListener(CachingTier.InvalidationListener<K,V> invalidationListener)
Set the caching tier's invalidation listener. |
| Methods inherited from interface org.ehcache.spi.cache.ConfigurationChangeSupport |
|---|
getConfigurationChangeListeners |
| Method Detail |
|---|
Store.ValueHolder<V> getOrComputeIfAbsent(K key,
Function<K,Store.ValueHolder<V>> source)
throws CacheAccessException
key - the key.source - the function that computes the value.
CacheAccessException
void invalidate(K key)
throws CacheAccessException
key - the key.
CacheAccessException
void invalidate(K key,
NullaryFunction<K> function)
throws CacheAccessException
key - the key.function - the function to call.
CacheAccessException
void clear()
throws CacheAccessException
CacheAccessExceptionvoid setInvalidationListener(CachingTier.InvalidationListener<K,V> invalidationListener)
invalidationListener - the listener.
java.lang.IllegalStateException - if the invalidation listener is already set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||