Modifier and Type | Field and Description |
---|---|
static int |
DATA_OFFSET |
static int |
HEAP_DATA_OVERHEAD |
static int |
PARTITION_HASH_OFFSET |
protected byte[] |
payload |
static int |
TYPE_OFFSET |
Modifier and Type | Method and Description |
---|---|
void |
copyTo(byte[] dest,
int destPos)
Copies the payload contained in the Data to the destination buffer.
|
int |
dataSize()
Returns size of internal binary data in bytes
|
boolean |
equals(Object o) |
int |
getHeapCost()
Returns approximate heap cost of this Data object in bytes.
|
int |
getPartitionHash()
Returns partition hash calculated for serialized object.
|
int |
getType()
Returns serialization type of binary form.
|
long |
hash64()
Returns 64-bit hash code for this Data object.
|
int |
hashCode() |
boolean |
hasPartitionHash()
Returns true if Data has partition hash, false otherwise.
|
boolean |
isPortable()
Returns true if this Data is created from a
Portable object,
false otherwise. |
byte[] |
toByteArray()
Returns byte array representation of internal binary format.
|
String |
toString() |
int |
totalSize()
Returns the total size of Data in bytes.
|
public static final int PARTITION_HASH_OFFSET
public static final int TYPE_OFFSET
public static final int DATA_OFFSET
public static final int HEAP_DATA_OVERHEAD
protected byte[] payload
public int dataSize()
Data
public int totalSize()
Data
public void copyTo(byte[] dest, int destPos)
Data
Data.toByteArray()
is the existence of the NativeMemoryData.
With the NativeMemoryData it would lead to a temporary byte-array. This method prevents this temporary byte-array needing
to be created.public int getPartitionHash()
Data
PartitioningStrategy
during serialization.
If partition hash is not set then standard hashCode() is used.getPartitionHash
in interface Data
PartitionAware
,
PartitioningStrategy
,
SerializationService.toData(Object, com.hazelcast.core.PartitioningStrategy)
public boolean hasPartitionHash()
Data
hasPartitionHash
in interface Data
public byte[] toByteArray()
Data
toByteArray
in interface Data
public int getType()
Data
Serializer.getTypeId()
public int getHeapCost()
Data
getHeapCost
in interface Data
public long hash64()
Data
public boolean isPortable()
Data
Portable
object,
false otherwise.isPortable
in interface Data
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.