org.ehcache.core.spi.cache.events
Interface StoreEvent<K,V>

Type Parameters:
K - the type of the keys used to access data within the store
V - the type of the values held within the store
All Known Implementing Classes:
StoreEventImpl

public interface StoreEvent<K,V>

An event resulting from a mutative Store operation.


Method Summary
 K getKey()
          The key of the mapping affected by the mutative event
 V getNewValue()
          The mapped value immediately after the mutative event occurred.
 V getOldValue()
          The mapped value immediately before the mutative event occurred.
 EventType getType()
          The type of mutative event
 

Method Detail

getType

EventType getType()
The type of mutative event

Returns:
the @{link EventType}

getKey

K getKey()
The key of the mapping affected by the mutative event

Returns:
the mutated key

getNewValue

V getNewValue()
The mapped value immediately after the mutative event occurred.

If the mutative event removes the mapping then null is returned.

Returns:
the mapped value after the mutation

getOldValue

V getOldValue()
The mapped value immediately before the mutative event occurred.

If the mutative event created the mapping then null is returned.

Returns:
the mapped value before the mutation