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


public interface StoreEventFilter<K,V>

Interface used to create Store event filters


Method Summary
 boolean acceptEvent(EventType type, K key, V oldValue, V newValue)
          Checks if an event is accepted.
 

Method Detail

acceptEvent

boolean acceptEvent(EventType type,
                    K key,
                    V oldValue,
                    V newValue)
Checks if an event is accepted.

Depending on the event type, oldValue or newValue may be null. EventType.CREATED events do not have an old value, EventType.UPDATED events have both while all other events only have an old value.

Parameters:
type - the event type
key - the key of the mapping on which the event occurs
oldValue - the old value, for UPDATED, EXPIRED, EVICTED and REMOVED events
newValue - the new value, for UPDATED and CREATED events
Returns:
true if the event is accepted, false otherwise