public interface MapEventPublisher
MapEventPublisherImpl
Modifier and Type | Method and Description |
---|---|
void |
addEventToQueryCache(Object eventData)
Notifies
QueryCache subscribers directly, without publishing an event to
other map listeners. |
boolean |
hasEventListener(String mapName)
Returns
true if there is at least one listener registered for the specified mapName . |
void |
hintMapEvent(Address caller,
String mapName,
EntryEventType eventType,
int numberOfEntriesAffected,
int partitionId)
Only gives a hint which indicates that a map-wide operation has just been executed on this partition.
|
void |
publishEvent(Address caller,
String mapName,
EntryEventType eventType,
Data dataKey,
Object dataOldValue,
Object dataValue)
Publish an event to the event subsystem.
|
void |
publishEvent(Address caller,
String mapName,
EntryEventType eventType,
Data dataKey,
Object dataOldValue,
Object dataValue,
Object dataMergingValue)
Publish an event to the event subsystem.
|
void |
publishLoadedOrAdded(Address caller,
String mapName,
Data dataKey,
Object dataOldValue,
Object dataValue)
This method tries to publish events after a load happened in a backward
compatible manner by choosing one of the two ways below:
- As ADD events if listener implements only
EntryAddedListener but not EntryLoadedListener , this is for the
backward compatibility. |
void |
publishMapEvent(Address caller,
String mapName,
EntryEventType eventType,
int numberOfEntriesAffected) |
void |
publishMapPartitionLostEvent(Address caller,
String mapName,
int partitionId) |
void |
publishWanRemove(String mapName,
Data key)
Notifies the WAN subsystem of a map entry removal on a replica owner.
|
void |
publishWanUpdate(String mapName,
EntryView<Data,Data> entryView,
boolean hasLoadProvenance)
Notifies the WAN subsystem of a map update on a replica owner.
|
void publishWanUpdate(String mapName, EntryView<Data,Data> entryView, boolean hasLoadProvenance)
mapName
- the map nameentryView
- the updated entryhasLoadProvenance
- true
to indicate the provenance of
update is a load from map-loader, otherwise
set false
void publishWanRemove(String mapName, Data key)
mapName
- the map namekey
- the key of the removed entryvoid publishMapEvent(Address caller, String mapName, EntryEventType eventType, int numberOfEntriesAffected)
void publishEvent(Address caller, String mapName, EntryEventType eventType, Data dataKey, Object dataOldValue, Object dataValue)
caller
- the address of the caller that caused the eventmapName
- the map nameeventType
- the event typedataKey
- the key of the event map entrydataOldValue
- the old value of the map entrydataValue
- the new value of the map entryvoid publishEvent(Address caller, String mapName, EntryEventType eventType, Data dataKey, Object dataOldValue, Object dataValue, Object dataMergingValue)
caller
- the address of the caller that caused the eventmapName
- the map nameeventType
- the event typedataKey
- the key of the event map entrydataOldValue
- the old value of the map entrydataValue
- the new value of the map entrydataMergingValue
- the value used when performing a merge operation in case of a EntryEventType.MERGED
event.
This value together with the old value produced the new value.void publishLoadedOrAdded(Address caller, String mapName, Data dataKey, Object dataOldValue, Object dataValue)
EntryAddedListener
but not EntryLoadedListener
, this is for the
backward compatibility. Old listener implementation will continue
to receive ADD events after loads happened.
- As LOAD events if listener implements EntryLoadedListener
caller
- the address of the caller that caused the eventmapName
- the map namedataKey
- the key of the event map entrydataOldValue
- the old value of the map entrydataValue
- the new value of the map entryvoid publishMapPartitionLostEvent(Address caller, String mapName, int partitionId)
void hintMapEvent(Address caller, String mapName, EntryEventType eventType, int numberOfEntriesAffected, int partitionId)
void addEventToQueryCache(Object eventData)
QueryCache
subscribers directly, without publishing an event to
other map listeners. This is necessary in certain cases, such as when loading entries into a map.eventData
- the event to publish to query cachesboolean hasEventListener(String mapName)
true
if there is at least one listener registered for the specified mapName
.Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.