Package com.tangosol.util
Class MapListenerSupport.FilterEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.tangosol.util.MapEvent<K,V>
-
- com.tangosol.net.cache.CacheEvent
-
- com.tangosol.util.MapListenerSupport.FilterEvent
-
- All Implemented Interfaces:
PortableObject
,Serializable
- Enclosing class:
- MapListenerSupport
public static class MapListenerSupport.FilterEvent extends CacheEvent
An extension of the CacheEvent which may carry no values (old or new), but instead holds on an array of Filter objects being the "cause" of the event.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tangosol.net.cache.CacheEvent
CacheEvent.TransformationState
-
-
Field Summary
Fields Modifier and Type Field Description protected Filter[]
f_aFilter
Filters that caused the event.protected MapEvent
f_event
Optional wrapped MapEvent.-
Fields inherited from class com.tangosol.net.cache.CacheEvent
EXPIRED, m_nFlags, m_transformState, PRIMING, SYNTHETIC
-
Fields inherited from class com.tangosol.util.MapEvent
ENTRY_DELETED, ENTRY_INSERTED, ENTRY_UPDATED, m_key, m_nId, m_nPartition, m_nVersion, m_valueNew, m_valueOld
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description FilterEvent(MapEvent event, Filter[] aFilter)
Constructs a new FilterEvent that wraps the given MapEvent.FilterEvent(ObservableMap map, int nId, Object oKey, boolean fSynthetic, boolean fPriming, Filter[] aFilter)
Constructs a new lite (no values are specified) FilterEvent.FilterEvent(ObservableMap map, int nId, Object oKey, boolean fSynthetic, Filter[] aFilter)
Constructs a new lite (no values are specified) FilterEvent.FilterEvent(ObservableMap map, int nId, Object oKey, Object oValueOld, Object oValueNew, boolean fSynthetic, boolean fPriming, Filter[] aFilter)
Constructs a new FilterEvent.FilterEvent(ObservableMap map, int nId, Object oKey, Object oValueOld, Object oValueNew, boolean fSynthetic, CacheEvent.TransformationState transformState, boolean fPriming, boolean fExpired, Filter[] aFilter)
Constructs a new FilterEvent.FilterEvent(ObservableMap map, int nId, Object oKey, Object oValueOld, Object oValueNew, boolean fSynthetic, CacheEvent.TransformationState transformState, boolean fPriming, Filter[] aFilter)
Constructs a new FilterEvent.FilterEvent(ObservableMap map, int nId, Object oKey, Object oValueOld, Object oValueNew, boolean fSynthetic, CacheEvent.TransformationState transformState, Filter[] aFilter)
Constructs a new FilterEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getDescription()
Get the event's description.Filter[]
getFilter()
Return an array of filters that are the cause of this event.Object
getKey()
Return a key associated with this event.MapEvent
getMapEvent()
Return the wrapped event.Object
getNewValue()
Return a new value associated with this event.Object
getOldValue()
Return an old value associated with this event.-
Methods inherited from class com.tangosol.net.cache.CacheEvent
getTransformationState, isExpired, isPriming, isSynthetic, isVersionUpdate, shouldDispatch, with
-
Methods inherited from class com.tangosol.util.MapEvent
dispatch, dispatch, dispatch, getDescription, getId, getMap, getNewEntry, getOldEntry, getPartition, getVersion, isDelete, isInsert, isUpdate, readExternal, toString, writeExternal
-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Constructor Detail
-
FilterEvent
public FilterEvent(ObservableMap map, int nId, Object oKey, boolean fSynthetic, Filter[] aFilter)
Constructs a new lite (no values are specified) FilterEvent.- Parameters:
map
- the ObservableMap object that fired the eventnId
- this event's idoKey
- the key into the mapfSynthetic
- true iff the event is caused by the cache internal processing such as eviction or loadingaFilter
- an array of filters that caused this event
-
FilterEvent
public FilterEvent(ObservableMap map, int nId, Object oKey, boolean fSynthetic, boolean fPriming, Filter[] aFilter)
Constructs a new lite (no values are specified) FilterEvent.- Parameters:
map
- the ObservableMap object that fired the eventnId
- this event's idoKey
- the key into the mapfSynthetic
- true iff the event is caused by the cache internal processing such as eviction or loadingfPriming
- a flag indicating whether or not the event is a priming eventaFilter
- an array of filters that caused this event
-
FilterEvent
public FilterEvent(ObservableMap map, int nId, Object oKey, Object oValueOld, Object oValueNew, boolean fSynthetic, boolean fPriming, Filter[] aFilter)
Constructs a new FilterEvent.- Parameters:
map
- the ObservableMap object that fired the eventnId
- this event's idoKey
- the key into the mapoValueOld
- the old valueoValueNew
- the new valuefSynthetic
- true iff the event is caused by the cache internal processing such as eviction or loadingfPriming
- a flag indicating whether or not the event is a priming eventaFilter
- an array of filters that caused this event
-
FilterEvent
public FilterEvent(ObservableMap map, int nId, Object oKey, Object oValueOld, Object oValueNew, boolean fSynthetic, CacheEvent.TransformationState transformState, Filter[] aFilter)
Constructs a new FilterEvent.- Parameters:
map
- the ObservableMap object that fired the eventnId
- this event's idoKey
- the key into the mapoValueOld
- the old valueoValueNew
- the new valuefSynthetic
- true iff the event is caused by the cache internal processing such as eviction or loadingtransformState
- thestate
describing how this event has been or should be transformedaFilter
- an array of filters that caused this event
-
FilterEvent
public FilterEvent(ObservableMap map, int nId, Object oKey, Object oValueOld, Object oValueNew, boolean fSynthetic, CacheEvent.TransformationState transformState, boolean fPriming, Filter[] aFilter)
Constructs a new FilterEvent.- Parameters:
map
- the ObservableMap object that fired the eventnId
- this event's idoKey
- the key into the mapoValueOld
- the old valueoValueNew
- the new valuefSynthetic
- true iff the event is caused by the cache internal processing such as eviction or loadingtransformState
- thestate
describing how this event has been or should be transformedfPriming
- a flag indicating whether or not the event is a priming eventaFilter
- an array of filters that caused this event
-
FilterEvent
public FilterEvent(ObservableMap map, int nId, Object oKey, Object oValueOld, Object oValueNew, boolean fSynthetic, CacheEvent.TransformationState transformState, boolean fPriming, boolean fExpired, Filter[] aFilter)
Constructs a new FilterEvent.- Parameters:
map
- the ObservableMap object that fired the eventnId
- this event's idoKey
- the key into the mapoValueOld
- the old valueoValueNew
- the new valuefSynthetic
- true iff the event is caused by the cache internal processing such as eviction or loadingtransformState
- thestate
describing how this event has been or should be transformedfPriming
- a flag indicating whether or not the event is a priming eventfExpired
- true iff the event results from an eviction due to timeaFilter
- an array of filters that caused this event- Since:
- 22.06
-
-
Method Detail
-
getFilter
public Filter[] getFilter()
Return an array of filters that are the cause of this event.- Returns:
- an array of filters
-
getMapEvent
public MapEvent getMapEvent()
Return the wrapped event.- Returns:
- the underlying
MapEvent
- Since:
- 12.2.1.4
-
getDescription
protected String getDescription()
Get the event's description.- Overrides:
getDescription
in classCacheEvent
- Returns:
- this event's description
-
getKey
public Object getKey()
Return a key associated with this event.
-
getOldValue
public Object getOldValue()
Return an old value associated with this event.The old value represents a value deleted from or updated in a map. It is always null for "insert" notifications.
- Overrides:
getOldValue
in classMapEvent
- Returns:
- an old value
-
getNewValue
public Object getNewValue()
Return a new value associated with this event.The new value represents a new value inserted into or updated in a map. It is always null for "delete" notifications.
- Overrides:
getNewValue
in classMapEvent
- Returns:
- a new value
-
-