com.hazelcast.cache.impl
Class CacheEventDataImpl

java.lang.Object
  extended by com.hazelcast.cache.impl.CacheEventDataImpl
All Implemented Interfaces:
CacheEventData, DataSerializable, IdentifiedDataSerializable

public class CacheEventDataImpl
extends Object
implements CacheEventData

Implementation of CacheEventData.

See Also:
CacheEventData

Constructor Summary
CacheEventDataImpl()
           
CacheEventDataImpl(String name, CacheEventType eventType, Data dataKey, Data dataNewValue, Data dataOldValue, boolean isOldValueAvailable)
           
 
Method Summary
 CacheEventType getCacheEventType()
          Gets cache event type of this event data.
 Data getDataKey()
          Gets cache entry key as Data.
 Data getDataOldValue()
          Gets the old value of entry as Data, if available.
 Data getDataValue()
          Gets cache entry value as Data.
 int getFactoryId()
          Returns DataSerializableFactory factory id for this class.
 int getId()
          Returns type identifier for this class.
 String getName()
          Gets the name of the cache.
 boolean isOldValueAvailable()
          Returns true if old value is available.
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 String toString()
           
 void writeData(ObjectDataOutput out)
          Writes object fields to output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheEventDataImpl

public CacheEventDataImpl()

CacheEventDataImpl

public CacheEventDataImpl(String name,
                          CacheEventType eventType,
                          Data dataKey,
                          Data dataNewValue,
                          Data dataOldValue,
                          boolean isOldValueAvailable)
Method Detail

getName

public String getName()
Description copied from interface: CacheEventData
Gets the name of the cache.

Specified by:
getName in interface CacheEventData
Returns:
the name of the cache.

getCacheEventType

public CacheEventType getCacheEventType()
Description copied from interface: CacheEventData
Gets cache event type of this event data.

Specified by:
getCacheEventType in interface CacheEventData
Returns:
Cache event type.
See Also:
CacheEventType

getDataKey

public Data getDataKey()
Description copied from interface: CacheEventData
Gets cache entry key as Data.

Specified by:
getDataKey in interface CacheEventData
Returns:
key as Data.

getDataValue

public Data getDataValue()
Description copied from interface: CacheEventData
Gets cache entry value as Data.

Specified by:
getDataValue in interface CacheEventData
Returns:
value as Data.

getDataOldValue

public Data getDataOldValue()
Description copied from interface: CacheEventData
Gets the old value of entry as Data, if available.

Specified by:
getDataOldValue in interface CacheEventData
Returns:
if available, old value of entry as Data, else null.

isOldValueAvailable

public boolean isOldValueAvailable()
Description copied from interface: CacheEventData
Returns true if old value is available.

Specified by:
isOldValueAvailable in interface CacheEventData
Returns:
true of old value is available, else returns false.

writeData

public void writeData(ObjectDataOutput out)
               throws IOException
Description copied from interface: DataSerializable
Writes object fields to output stream

Specified by:
writeData in interface DataSerializable
Parameters:
out - output
Throws:
IOException

readData

public void readData(ObjectDataInput in)
              throws IOException
Description copied from interface: DataSerializable
Reads fields from the input stream

Specified by:
readData in interface DataSerializable
Parameters:
in - input
Throws:
IOException

getId

public int getId()
Description copied from interface: IdentifiedDataSerializable
Returns type identifier for this class. Id should be unique per DataSerializableFactory.

Specified by:
getId in interface IdentifiedDataSerializable
Returns:
type id

getFactoryId

public int getFactoryId()
Description copied from interface: IdentifiedDataSerializable
Returns DataSerializableFactory factory id for this class.

Specified by:
getFactoryId in interface IdentifiedDataSerializable
Returns:
factory id

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.