public class DefaultEntryEventFilteringStrategy extends AbstractFilteringStrategy
UPDATED
events, the predicate is evaluated against the new value; if the new value
matches the predicate, then the UPDATED
event will be published to the registered listeners.
Note that when trying to build a continuous query cache, this filtering strategy is flawed, as the listener will not be
notified for updated entries whose old value matched the predicate while new value does not match the predicate. This has
been addressed in QueryCacheNaturalFilteringStrategy
.
QueryCacheNaturalFilteringStrategy
mapServiceContext, serializationService
FILTER_DOES_NOT_MATCH
Constructor and Description |
---|
DefaultEntryEventFilteringStrategy(InternalSerializationService serializationService,
MapServiceContext mapServiceContext) |
Modifier and Type | Method and Description |
---|---|
int |
doFilter(EventFilter filter,
Data dataKey,
Object oldValue,
Object dataValue,
EntryEventType eventType,
String mapNameOrNull)
Main entry point for filtering events according to given filter.
|
EntryEventDataCache |
getEntryEventDataCache() |
String |
toString() |
evaluateQueryEventFilter, getThisNodesAddress, processEntryEventFilter
public DefaultEntryEventFilteringStrategy(InternalSerializationService serializationService, MapServiceContext mapServiceContext)
public int doFilter(EventFilter filter, Data dataKey, Object oldValue, Object dataValue, EntryEventType eventType, String mapNameOrNull)
filter
- the event filterdataKey
- the event entry keyoldValue
- the old value of the event entrydataValue
- the new value of the event entryeventType
- the event typemapNameOrNull
- the map name. May be null if this is not a map event (e.g. cache event)FilteringStrategy.FILTER_DOES_NOT_MATCH
if the event does not match the filter, otherwise
the integer event type of the event to be published. This allows a filtering strategy
to alter the type of event that is actually published, depending on the attributes of the
individual event registration.IllegalArgumentException
- if the provided filter
is not of a known typepublic EntryEventDataCache getEntryEventDataCache()
EntryEventDataCache
implementation to be used with this filtering strategyCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.