L
- The type of event listener the cache usespublic abstract class AbstractCacheAdapter<L> extends Object implements Cache
Cache.EntryListener, Cache.EntryListenerAdapter
Constructor and Description |
---|
AbstractCacheAdapter() |
Modifier and Type | Method and Description |
---|---|
protected abstract L |
createListenerAdapter(Cache.EntryListener cacheEntryListener)
Creates an adapter for the given
cacheEntryListener . |
protected abstract Registration |
doRegisterListener(L listenerAdapter)
Registers the given listener with the cache implementation
|
Registration |
registerCacheEntryListener(Cache.EntryListener entryListener)
Registers the given
cacheEntryListener to listen for Cache changes. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
computeIfAbsent, computeIfPresent, containsKey, get, put, putIfAbsent, remove, removeAll
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 forpublic Registration registerCacheEntryListener(Cache.EntryListener entryListener)
Cache
cacheEntryListener
to listen for Cache changes.registerCacheEntryListener
in interface Cache
entryListener
- The listener to registerprotected abstract Registration doRegisterListener(L listenerAdapter)
listenerAdapter
- the listener to registerCopyright © 2010–2024. All rights reserved.