K
- the key type of mappingsV
- the value type of mappingspublic interface CacheEventDispatcher<K,V> extends ConfigurationChangeSupport
Store
eventing system, by providing the
StoreEventDispatcher
used to collect events and then produce
CacheEvent
s that can be consumed by CacheEventListener
s.Modifier and Type | Method and Description |
---|---|
void |
deregisterCacheEventListener(CacheEventListener<? super K,? super V> listener)
De-registers a cache event listener from this dispatcher.
|
void |
registerCacheEventListener(CacheEventListener<? super K,? super V> listener,
EventOrdering ordering,
EventFiring firing,
java.util.EnumSet<EventType> eventTypes)
Registers a new cache event listener in this dispatcher.
|
void |
setListenerSource(Cache<K,V> source)
Injects the cache acting as the event source
|
void |
setStoreEventSource(StoreEventSource<K,V> eventSource)
Injects the store event source providing events to the listeners.
|
void |
shutdown()
Shuts down this dispatcher
|
getConfigurationChangeListeners
void registerCacheEventListener(CacheEventListener<? super K,? super V> listener, EventOrdering ordering, EventFiring firing, java.util.EnumSet<EventType> eventTypes)
listener
- the listener to registerordering
- event orderingfiring
- event firingeventTypes
- event types this listener wantsvoid deregisterCacheEventListener(CacheEventListener<? super K,? super V> listener)
listener
- the listener to removevoid shutdown()
void setListenerSource(Cache<K,V> source)
source
- the cache this dispatcher works withvoid setStoreEventSource(StoreEventSource<K,V> eventSource)
eventSource
- the store event source