com.hazelcast.nio.serialization
Class Data
java.lang.Object
com.hazelcast.nio.serialization.Data
- All Implemented Interfaces:
- DataSerializable, IdentifiedDataSerializable
public final class Data
- extends Object
- implements IdentifiedDataSerializable
Constructor Summary |
Data()
|
Data(int type,
byte[] bytes)
|
FACTORY_ID
public static final int FACTORY_ID
- See Also:
- Constant Field Values
ID
public static final int ID
- See Also:
- Constant Field Values
NO_CLASS_ID
public static final int NO_CLASS_ID
- See Also:
- Constant Field Values
Data
public Data()
Data
public Data(int type,
byte[] bytes)
postConstruct
public void postConstruct(SerializationContext context)
readData
public void readData(com.hazelcast.nio.ObjectDataInput in)
throws IOException
- WARNING:
Should be in sync with
DataAdapter.readFrom(java.nio.ByteBuffer)
- Specified by:
readData
in interface DataSerializable
- Throws:
IOException
writeData
public void writeData(com.hazelcast.nio.ObjectDataOutput out)
throws IOException
- WARNING:
Should be in sync with
DataAdapter.writeTo(java.nio.ByteBuffer)
totalSize()
should be updated whenever writeData method is changed.
- Specified by:
writeData
in interface DataSerializable
- Throws:
IOException
bufferSize
public int bufferSize()
totalSize
public int totalSize()
- Calculates the size of the binary after the Data is serialized.
WARNING:
Should be in sync with
writeData(com.hazelcast.nio.ObjectDataOutput)
getHeapCost
public int getHeapCost()
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
getPartitionHash
public int getPartitionHash()
getType
public int getType()
getClassDefinition
public ClassDefinition getClassDefinition()
getBuffer
public byte[] getBuffer()
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
getFactoryId
public int getFactoryId()
- Specified by:
getFactoryId
in interface IdentifiedDataSerializable
getId
public int getId()
- Specified by:
getId
in interface IdentifiedDataSerializable
isPortable
public boolean isPortable()
isDataSerializable
public boolean isDataSerializable()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.