public interface StoreEventDispatcher<K,V> extends StoreEventSource<K,V>
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.
| Modifier and Type | Method and Description |
|---|---|
StoreEventSink<K,V> |
eventSink()
Hands over an event sink for recording store events.
|
void |
releaseEventSink(StoreEventSink<K,V> eventSink)
Releases the event sink after normal completion of an operation.
|
void |
releaseEventSinkAfterFailure(StoreEventSink<K,V> eventSink,
java.lang.Throwable throwable)
Releases the event sink after failure of an operation.
|
void |
reset(StoreEventSink<K,V> eventSink)
Reset an event sink by dropping all queued events.
|
addEventFilter, addEventListener, isEventOrdering, removeEventListener, setEventOrdering, setSynchronousStoreEventSink<K,V> eventSink()
void releaseEventSink(StoreEventSink<K,V> eventSink)
eventSink - the event sink to releasevoid releaseEventSinkAfterFailure(StoreEventSink<K,V> eventSink, java.lang.Throwable throwable)
eventSink - the event sink to releasethrowable - the exceptionvoid reset(StoreEventSink<K,V> eventSink)
eventSink - the event sink to reset