public final class Data extends Object implements IdentifiedDataSerializable
Modifier and Type | Field and Description |
---|---|
static int |
FACTORY_ID |
static int |
ID |
static int |
NO_CLASS_ID |
Modifier and Type | Method and Description |
---|---|
int |
bufferSize() |
boolean |
equals(Object obj) |
byte[] |
getBuffer() |
ClassDefinition |
getClassDefinition() |
int |
getFactoryId()
Returns DataSerializableFactory factory id for this class.
|
int |
getHeapCost() |
int |
getId()
Returns type identifier for this class.
|
int |
getPartitionHash() |
int |
getType() |
int |
hashCode() |
boolean |
isDataSerializable() |
boolean |
isPortable() |
void |
postConstruct(PortableContext context) |
void |
readData(ObjectDataInput in)
WARNING:
Should be in sync with
DataAdapter.readFrom(java.nio.ByteBuffer) |
String |
toString() |
int |
totalSize()
Calculates the size of the binary after the Data is serialized.
|
void |
writeData(ObjectDataOutput out)
WARNING:
Should be in sync with
DataAdapter.writeTo(java.nio.ByteBuffer)
totalSize() should be updated whenever writeData method is changed. |
public static final int FACTORY_ID
public static final int ID
public static final int NO_CLASS_ID
public void postConstruct(PortableContext context)
public void readData(ObjectDataInput in) throws IOException
DataAdapter.readFrom(java.nio.ByteBuffer)
readData
in interface DataSerializable
in
- inputIOException
public void writeData(ObjectDataOutput out) throws IOException
DataAdapter.writeTo(java.nio.ByteBuffer)
totalSize()
should be updated whenever writeData method is changed.writeData
in interface DataSerializable
out
- outputIOException
public int bufferSize()
public int totalSize()
writeData(com.hazelcast.nio.ObjectDataOutput)
public int getHeapCost()
public int getPartitionHash()
public int getType()
public ClassDefinition getClassDefinition()
public byte[] getBuffer()
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public boolean isPortable()
public boolean isDataSerializable()
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.