public interface EntryEventDataCache
EntryEventData
. Instances of this interface are obtained by FilteringStrategy
s. This provides a
chance for filtering strategies to optimize event data caching implementation. This is not a general-purpose cache, rather it
is meant to be used within the context of processing a single entry event in single-threaded code. This will
allow creating less instances that are shared between listener registrations. The concrete number of created instances
depends on the implementation. Every new event will need to obtain a new instance of the EntryEventDataCache
.Modifier and Type | Method and Description |
---|---|
Collection<EntryEventData> |
eventDataExcludingValues()
Return
EntryEventData created & cached by invocations to
getOrCreateEventData(String, Address, Data, Object, Object, Object, int, boolean) , excluding values from
the EntryEventData object. |
Collection<EntryEventData> |
eventDataIncludingValues()
Return
EntryEventData created & cached by invocations to
getOrCreateEventData(String, Address, Data, Object, Object, Object, int, boolean) , including values in
the EntryEventData object. |
EntryEventData |
getOrCreateEventData(String mapName,
Address caller,
Data dataKey,
Object newValue,
Object oldValue,
Object mergingValue,
int eventType,
boolean includingValues)
If an
EntryEventData for the given parameters is already cached then return the cached value, otherwise create,
cache and return the EntryEventData . |
boolean |
isEmpty()
Indicate whether event data have been created and are cached in this cache or not.
|
EntryEventData getOrCreateEventData(String mapName, Address caller, Data dataKey, Object newValue, Object oldValue, Object mergingValue, int eventType, boolean includingValues)
EntryEventData
for the given parameters is already cached then return the cached value, otherwise create,
cache and return the EntryEventData
.mapName
- name of mapcaller
- the address of the caller that caused the eventdataKey
- the key of the event map entrynewValue
- the new value of the map entryoldValue
- the old value of the map entrymergingValue
- 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.eventType
- the event typeincludingValues
- if all of the entry values need to be included in the returned EntryEventData
EntryEventData
already cached in Map eventDataPerEventType
for the given eventType
or
if not already cached, a new EntryEventData
object.boolean isEmpty()
eventDataIncludingValues.size() + eventDataExcludingValues.size() > 0
.true
if event data were not created in this cache, otherwise false.Collection<EntryEventData> eventDataIncludingValues()
EntryEventData
created & cached by invocations to
getOrCreateEventData(String, Address, Data, Object, Object, Object, int, boolean)
, including values in
the EntryEventData
object.EntryEventData
created & cached including values. When no such EntryEventData
exist, may
return null
or empty collection.Collection<EntryEventData> eventDataExcludingValues()
EntryEventData
created & cached by invocations to
getOrCreateEventData(String, Address, Data, Object, Object, Object, int, boolean)
, excluding values from
the EntryEventData
object.EntryEventData
created & cached excluding values. When no such EntryEventData
exist, may
return null
or empty collection.Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.