public class CacheEventDispatcherImpl<K,V>
extends java.lang.Object
implements org.ehcache.core.events.CacheEventDispatcher<K,V>
Use of this class is linked to having cache events on a user managed cache.
Note on event ordering guarantees: Events are received and transmitted to register listeners through the
registration of a StoreEventListener on the linked StoreEventSource which is responsible for event
ordering.
| Constructor and Description |
|---|
CacheEventDispatcherImpl(java.util.concurrent.ExecutorService unOrderedExecutor,
java.util.concurrent.ExecutorService orderedExecutor)
Creates a new
CacheEventDispatcher instance that will use the provided ExecutorService to handle
events firing. |
| Modifier and Type | Method and Description |
|---|---|
void |
deregisterCacheEventListener(org.ehcache.event.CacheEventListener<? super K,? super V> listener) |
java.util.List<org.ehcache.core.CacheConfigurationChangeListener> |
getConfigurationChangeListeners() |
void |
registerCacheEventListener(org.ehcache.event.CacheEventListener<? super K,? super V> listener,
org.ehcache.event.EventOrdering ordering,
org.ehcache.event.EventFiring firing,
java.util.EnumSet<org.ehcache.event.EventType> forEventTypes) |
void |
setListenerSource(org.ehcache.Cache<K,V> source) |
void |
setStoreEventSource(org.ehcache.core.spi.store.events.StoreEventSource<K,V> eventSource) |
void |
shutdown() |
public CacheEventDispatcherImpl(java.util.concurrent.ExecutorService unOrderedExecutor,
java.util.concurrent.ExecutorService orderedExecutor)
CacheEventDispatcher instance that will use the provided ExecutorService to handle
events firing.unOrderedExecutor - the executor service used when ordering is not requiredorderedExecutor - the executor service used when ordering is requiredpublic void registerCacheEventListener(org.ehcache.event.CacheEventListener<? super K,? super V> listener, org.ehcache.event.EventOrdering ordering, org.ehcache.event.EventFiring firing, java.util.EnumSet<org.ehcache.event.EventType> forEventTypes)
public void deregisterCacheEventListener(org.ehcache.event.CacheEventListener<? super K,? super V> listener)
public void shutdown()
public java.util.List<org.ehcache.core.CacheConfigurationChangeListener> getConfigurationChangeListeners()
getConfigurationChangeListeners in interface org.ehcache.core.spi.store.ConfigurationChangeSupport