public class DeserializingEventJournalCacheEvent<K,V> extends InternalEventJournalCacheEvent implements EventJournalCacheEvent<K,V>, HazelcastInstanceAware
dataKey, dataNewValue, dataOldValue, eventType
Constructor and Description |
---|
DeserializingEventJournalCacheEvent() |
DeserializingEventJournalCacheEvent(SerializationService serializationService,
InternalEventJournalCacheEvent je) |
Modifier and Type | Method and Description |
---|---|
int |
getId()
Returns type identifier for this class.
|
K |
getKey()
Returns the key for the event entry.
|
V |
getNewValue()
Returns the new value for the event entry.
|
V |
getOldValue()
Returns the old value for the event entry.
|
CacheEventType |
getType()
Returns the event type.
|
void |
setHazelcastInstance(HazelcastInstance hazelcastInstance)
Gets the HazelcastInstance reference when submitting a Runnable/Callable using Hazelcast ExecutorService.
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
equals, getDataKey, getDataNewValue, getDataOldValue, getEventType, getFactoryId, hashCode, readData, toString
public DeserializingEventJournalCacheEvent()
public DeserializingEventJournalCacheEvent(SerializationService serializationService, InternalEventJournalCacheEvent je)
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
getId
in class InternalEventJournalCacheEvent
public K getKey()
EventJournalCacheEvent
getKey
in interface EventJournalCacheEvent<K,V>
public V getNewValue()
EventJournalCacheEvent
null
while in other cases it may be non-null
. For instance,
when the event is of type CacheEventType.CREATED
, the new
value is non-null
but when it is of type CacheEventType.REMOVED
,
the value is null
.getNewValue
in interface EventJournalCacheEvent<K,V>
public V getOldValue()
EventJournalCacheEvent
null
while in other cases it may be non-null
. For instance,
when the event is of type CacheEventType.CREATED
, the old
value is null
but when it is of type CacheEventType.REMOVED
,
the value is non-null
.getOldValue
in interface EventJournalCacheEvent<K,V>
public CacheEventType getType()
EventJournalCacheEvent
getType
in interface EventJournalCacheEvent<K,V>
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
writeData
in class InternalEventJournalCacheEvent
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void setHazelcastInstance(HazelcastInstance hazelcastInstance)
HazelcastInstanceAware
setHazelcastInstance
in interface HazelcastInstanceAware
hazelcastInstance
- the HazelcastInstance referenceCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.