Data¶
-
class
Data(buff=None)¶ Bases:
objectData is basic unit of serialization. It stores binary form of an object serialized by serialization service
-
to_bytes()¶ Returns byte array representation of internal binary format.
- Returns
(byte array), byte array representation of internal binary format.
-
get_type()¶ Returns serialization type of binary form.
- Returns
Serialization type of binary form.
-
total_size()¶ Returns the total size of Data in bytes.
- Returns
(int), total size of Data in bytes.
-
data_size()¶ Returns size of internal binary data in bytes.
- Returns
(int), size of internal binary data in bytes.
-
get_partition_hash()¶ - Returns partition hash calculated for serialized object.
- Partition hash is used to determine partition of a Data and is calculated using
PartitioningStrategy during serialization.
If partition hash is not set then hash_code() is used.
- Returns
partition hash
-
is_portable()¶ Determines whether this Data is created from a
Portable. object or not.- Returns
(bool),
trueif source object is Portable,falseotherwise.
-
has_partition_hash()¶ Determines whether this Data has partition hash or not.
- Returns
(bool),
trueif Data has partition hash,falseotherwise.
-
hash_code()¶ Returns the murmur hash of the internal data.
- Returns
the murmur hash of the internal data.
-