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

All Superinterfaces:
StoreEventSource<K,V>
All Known Implementing Classes:
NullStoreEventDispatcher, ScopedStoreEventDispatcher, ThreadLocalStoreEventDispatcher

public interface StoreEventDispatcher<K,V>
extends StoreEventSource<K,V>

Part of the events subsystem at the Store level.

This interface controls the lifecycle of StoreEventSinks, enabling implementations to decouple the event raising inside the Store from the firing to outside collaborators.

Store implementations are expected to get a StoreEventSink per operation and release it once the operation completes.


Method Summary
 StoreEventSink<K,V> eventSink()
           
 void releaseEventSink(StoreEventSink<K,V> eventSink)
           
 void releaseEventSinkAfterFailure(StoreEventSink<K,V> eventSink, java.lang.Throwable throwable)
           
 
Methods inherited from interface org.ehcache.core.spi.cache.events.StoreEventSource
addEventFilter, addEventListener, isEventOrdering, removeEventListener, setEventOrdering
 

Method Detail

eventSink

StoreEventSink<K,V> eventSink()

releaseEventSink

void releaseEventSink(StoreEventSink<K,V> eventSink)

releaseEventSinkAfterFailure

void releaseEventSinkAfterFailure(StoreEventSink<K,V> eventSink,
                                  java.lang.Throwable throwable)