EhCache3Adapter instead, which uses ehcache 3.@Deprecated public class EhCacheAdapter extends AbstractCacheAdapter<net.sf.ehcache.event.CacheEventListener>
Cache.EntryListener, Cache.EntryListenerAdapter| Constructor and Description |
|---|
EhCacheAdapter(net.sf.ehcache.Ehcache ehCache)
Deprecated.
Initialize the adapter to forward all call to the given
ehCache instance |
| Modifier and Type | Method and Description |
|---|---|
<V> void |
computeIfPresent(Object key,
UnaryOperator<V> update)
Deprecated.
Perform the
update in the value behind the given key. |
boolean |
containsKey(Object key)
Deprecated.
Indicates whether there is an item stored under given
key. |
protected org.axonframework.common.caching.EhCacheAdapter.CacheEventListenerAdapter |
createListenerAdapter(Cache.EntryListener cacheEntryListener)
Deprecated.
Creates an adapter for the given
cacheEntryListener. |
protected Registration |
doRegisterListener(net.sf.ehcache.event.CacheEventListener listenerAdapter)
Deprecated.
Registers the given listener with the cache implementation
|
<K,V> V |
get(K key)
Deprecated.
Returns an item from the cache, or
null if no item was stored under that key |
void |
put(Object key,
Object value)
Deprecated.
Stores the given
value in the cache, under given key. |
boolean |
putIfAbsent(Object key,
Object value)
Deprecated.
Stores the given
value in the cache, under given key, if no element is yet available under that
key. |
boolean |
remove(Object key)
Deprecated.
Removes the entry stored under given
key. |
void |
removeAll()
Deprecated.
Remove all stored entries in this cache.
|
registerCacheEntryListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomputeIfAbsentpublic EhCacheAdapter(net.sf.ehcache.Ehcache ehCache)
ehCache instanceehCache - The cache instance to forward calls topublic <K,V> V get(K key)
Cachenull if no item was stored under that keyK - The type of key usedV - The type of value storedkey - The key under which the item was cachedpublic void put(Object key, Object value)
Cachevalue in the cache, under given key. If an item already exists, it is updated
with the new value.key - The key under which to store the itemvalue - The item to cachepublic boolean putIfAbsent(Object key, Object value)
Cachevalue in the cache, under given key, if no element is yet available under that
key. This operation is performed atomically.key - The key under which to store the itemvalue - The item to cachetrue if no value was previously assigned to the key, false otherwise.public boolean remove(Object key)
Cachekey. If no such entry exists, nothing happens.key - The key under which the item was storedtrue if a value was previously assigned to the key and has been removed, false otherwise.public void removeAll()
Cachepublic boolean containsKey(Object key)
Cachekey.key - The key to checktrue if an item is available under that key, false otherwise.public <V> void computeIfPresent(Object key, UnaryOperator<V> update)
Cacheupdate in the value behind the given key. The update is only executed if
there's an entry referencing the key.V - The type of the value to execute the update for.key - The key to perform an update for, if not empty.update - The update to perform if the key is present.protected org.axonframework.common.caching.EhCacheAdapter.CacheEventListenerAdapter createListenerAdapter(Cache.EntryListener cacheEntryListener)
AbstractCacheAdaptercacheEntryListener. The adapter must forward all incoming
notifications to the respective methods on the cacheEntryListener.createListenerAdapter in class AbstractCacheAdapter<net.sf.ehcache.event.CacheEventListener>cacheEntryListener - The listener to create an adapter forprotected Registration doRegisterListener(net.sf.ehcache.event.CacheEventListener listenerAdapter)
AbstractCacheAdapterdoRegisterListener in class AbstractCacheAdapter<net.sf.ehcache.event.CacheEventListener>listenerAdapter - the listener to registerCopyright © 2010–2025. All rights reserved.