public class AsyncInvalidationExoCache<K extends Serializable,V> extends ConcurrentFIFOExoCache<K,V>
ExoCache will behave exactly the same way as ConcurrentFIFOExoCache
except in case of a cache change, indeed the modifications will be first applied locally
then it will be invalidated over the cluster asynchronously to limit the performance impact
on the local cluster node.
This class can be used as a drop-in replacement for ConcurrentFIFOExoCache in a cluster environment.| Constructor and Description |
|---|
AsyncInvalidationExoCache(ExoCache<K,HashCode<V>> replicatedCache) |
| Modifier and Type | Method and Description |
|---|---|
List<ListenerContext<K,V>> |
getListeners() |
void |
onClearCache()
on clear cache event
|
void |
onExpire(K key,
V obj)
On expire entry event
|
void |
put(K key,
V value)
Performs a put in the cache.
|
void |
putLocal(K key,
V value)
Performs a put in the cache local mode (avoid replication).
|
void |
putMap(Map<? extends K,? extends V> objs)
Performs a put of all the entries provided by the map argument.
|
V |
remove(Serializable key)
Removes an entry from the cache.
|
void |
removeLocal(Serializable key)
Removes an entry from the cache local mode (avoid replication).
|
addCacheListener, assertConsistent, clearCache, get, getCachedObjects, getCacheHit, getCacheMiss, getCacheSize, getLabel, getLiveTime, getLiveTimeMillis, getMaxSize, getName, isLogEnabled, onGet, onPut, onPutLocal, onRemove, removeCachedObjects, select, setLabel, setLiveTime, setLiveTimeMillis, setLogEnabled, setMaxSize, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitputAsyncMappublic void put(K key, V value) throws NullPointerException
ExoCacheput in interface ExoCache<K extends Serializable,V>put in class ConcurrentFIFOExoCache<K extends Serializable,V>key - the cache keyvalue - the cached valueNullPointerException - if the key is nullpublic void putLocal(K key, V value) throws NullPointerException
ExoCacheputLocal in interface ExoCache<K extends Serializable,V>putLocal in class ConcurrentFIFOExoCache<K extends Serializable,V>key - the cache keyvalue - the cached valueNullPointerException - if the key is nullpublic V remove(Serializable key) throws NullPointerException
ExoCacheremove in interface ExoCache<K extends Serializable,V>remove in class ConcurrentFIFOExoCache<K extends Serializable,V>key - the cache keyNullPointerException - if the provided key is nullpublic void removeLocal(Serializable key) throws NullPointerException
ExoCachekey - the cache keyNullPointerException - if the provided key is nullpublic void putMap(Map<? extends K,? extends V> objs) throws NullPointerException, IllegalArgumentException
ExoCacheputMap in interface ExoCache<K extends Serializable,V>putMap in class ConcurrentFIFOExoCache<K extends Serializable,V>objs - the objects to putNullPointerException - if the provided argument is nullIllegalArgumentException - if the provided map contains a null keypublic void onExpire(K key, V obj)
ExoCacheonExpire in interface ExoCache<K extends Serializable,V>onExpire in class ConcurrentFIFOExoCache<K extends Serializable,V>key - entry keyobj - valuepublic void onClearCache()
ExoCacheonClearCache in interface ExoCache<K extends Serializable,V>onClearCache in class ConcurrentFIFOExoCache<K extends Serializable,V>public List<ListenerContext<K,V>> getListeners()
getListeners in class ConcurrentFIFOExoCache<K extends Serializable,V>Copyright © 2020 eXo Platform SAS. All Rights Reserved.