org.ehcache.core.events
Interface CacheEventDispatcher<K,V>

Type Parameters:
K - the key type of mappings
V - the value type of mappings
All Superinterfaces:
ConfigurationChangeSupport
All Known Implementing Classes:
CacheEventDispatcherImpl

public interface CacheEventDispatcher<K,V>
extends ConfigurationChangeSupport

Bridges the Store eventing system, by providing the StoreEventDispatcher used to collect events and then produce CacheEvents that can be consumed by CacheEventListeners.


Method Summary
 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
 
Methods inherited from interface org.ehcache.core.spi.cache.ConfigurationChangeSupport
getConfigurationChangeListeners
 

Method Detail

registerCacheEventListener

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.

Parameters:
listener - the listener to register
ordering - event ordering
firing - event firing
eventTypes - event types this listener wants

deregisterCacheEventListener

void deregisterCacheEventListener(CacheEventListener<? super K,? super V> listener)
De-registers a cache event listener from this dispatcher.

Parameters:
listener - the listener to remove

shutdown

void shutdown()
Shuts down this dispatcher


setListenerSource

void setListenerSource(Cache<K,V> source)
Injects the cache acting as the event source

Parameters:
source - the cache this dispatcher works with

setStoreEventSource

void setStoreEventSource(StoreEventSource<K,V> eventSource)
Injects the store event source providing events to the listeners.

Parameters:
eventSource - the store event source