|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.cache.NoCache
public final class NoCache
Cache implementation that does absolutely nothing. Objects aren't cached, making it a special case implementation for the case when caching is disabled.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.axonframework.cache.Cache |
|---|
Cache.EntryListener, Cache.EntryListenerAdapter |
| Field Summary | |
|---|---|
static NoCache |
INSTANCE
Creates a singleton reference the the NoCache implementation. |
| Method Summary | ||
|---|---|---|
boolean |
containsKey(Object key)
Indicates whether there is an item stored under given key. |
|
|
get(K key)
Returns an item from the cache, or null if no item was stored under that key |
|
void |
put(Object key,
Object value)
Stores the given value in the cache, under given key. |
|
boolean |
putIfAbsent(Object key,
Object value)
Stores the given value in the cache, under given key, if no element is yet available
under that key. |
|
void |
registerCacheEntryListener(Cache.EntryListener cacheEntryListener)
Registers the given cacheEntryListener to listen for Cache changes. |
|
boolean |
remove(Object key)
Removes the entry stored under given key. |
|
void |
unregisterCacheEntryListener(Cache.EntryListener cacheEntryRemovedListener)
Unregisters the previously registered cacheEntryListener. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final NoCache INSTANCE
| Method Detail |
|---|
public <K,V> V get(K key)
Cachenull if no item was stored under that key
get in interface CacheK - The type of key usedV - The type of value storedkey - The key under which the item was cached
public 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.
put in interface Cachekey - The key under which to store the itemvalue - The item to cache
public 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.
putIfAbsent in interface Cachekey - The key under which to store the itemvalue - The item to cache
true if no value was previously assigned to the key, false otherwise.public boolean remove(Object key)
Cachekey. If no such entry exists, nothing happens.
remove in interface Cachekey - The key under which the item was stored
true if a value was previously assigned to the key and has been removed, false
otherwise.public boolean containsKey(Object key)
Cachekey.
containsKey in interface Cachekey - The key to check
true if an item is available under that key, false otherwise.public void registerCacheEntryListener(Cache.EntryListener cacheEntryListener)
CachecacheEntryListener to listen for Cache changes.
registerCacheEntryListener in interface CachecacheEntryListener - The listener to registerpublic void unregisterCacheEntryListener(Cache.EntryListener cacheEntryRemovedListener)
CachecacheEntryListener.
unregisterCacheEntryListener in interface CachecacheEntryRemovedListener - The listener to unregister
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||