|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.cache.AbstractCacheAdapter<L>
L
- The type of event listener the cache usespublic abstract class AbstractCacheAdapter<L>
Abstract implementation of the Cache interface which makes it easier to implement Adapters.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.axonframework.cache.Cache |
---|
Cache.EntryListener, Cache.EntryListenerAdapter |
Constructor Summary | |
---|---|
AbstractCacheAdapter()
|
Method Summary | |
---|---|
protected abstract L |
createListenerAdapter(Cache.EntryListener cacheEntryListener)
Creates an adapter for the given cacheEntryListener . |
protected abstract void |
doRegisterListener(L listenerAdapter)
Registers the given listener with the cache implementation |
protected abstract void |
doUnregisterListener(L listenerAdapter)
Unregisters the given listener with the cache |
void |
registerCacheEntryListener(Cache.EntryListener entryListener)
Registers the given cacheEntryListener to listen for Cache changes. |
void |
unregisterCacheEntryListener(Cache.EntryListener entryListener)
Unregisters the previously registered cacheEntryListener . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.axonframework.cache.Cache |
---|
containsKey, get, put, putIfAbsent, remove |
Constructor Detail |
---|
public AbstractCacheAdapter()
Method Detail |
---|
protected abstract L createListenerAdapter(Cache.EntryListener cacheEntryListener)
cacheEntryListener
. The adapter must forward all incoming
notifications to the respective methods on the cacheEntryListener
.
cacheEntryListener
- The listener to create an adapter for
public void registerCacheEntryListener(Cache.EntryListener entryListener)
Cache
cacheEntryListener
to listen for Cache changes.
registerCacheEntryListener
in interface Cache
entryListener
- The listener to registerpublic void unregisterCacheEntryListener(Cache.EntryListener entryListener)
Cache
cacheEntryListener
.
unregisterCacheEntryListener
in interface Cache
entryListener
- The listener to unregisterprotected abstract void doUnregisterListener(L listenerAdapter)
listener
with the cache
listenerAdapter
- The listener to register with the cacheprotected abstract void doRegisterListener(L listenerAdapter)
listenerAdapter
- the listener to register
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |