public interface Data
SerializationService.toData(Object)
.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
|
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.
|
boolean |
hasPartitionHash()
Returns true if Data has partition hash, false otherwise.
|
boolean |
isJson()
Returns true if this Data is created from a
HazelcastJsonValue object,
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.
|
int |
totalSize()
Returns the total size of Data in bytes.
|
byte[] toByteArray()
int getType()
Serializer.getTypeId()
int totalSize()
void copyTo(byte[] dest, int destPos)
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.dest
- to byte-buffer to write todestPos
- the position in the destination buffer.int dataSize()
int getHeapCost()
int getPartitionHash()
PartitioningStrategy
during serialization.
If partition hash is not set then standard hashCode() is used.PartitionAware
,
PartitioningStrategy
,
SerializationService.toData(Object, com.hazelcast.core.PartitioningStrategy)
boolean hasPartitionHash()
long hash64()
boolean isPortable()
Portable
object,
false otherwise.boolean isJson()
HazelcastJsonValue
object,
false otherwiseCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.