Class PartitionId (6.89.0)

publicfinalclassPartitionIdimplementsSerializable

Contains a reference to a BatchTransactionId and a Partition. The combination of these two are needed to execute a partition of a partitioned query on a Connection. A PartitionId can safely be given to a different connection and/or host to be executed there.

Inheritance

Object > PartitionId

Implements

Serializable

Static Methods

decodeFromString(String id)

publicstaticPartitionIddecodeFromString(Stringid)

Deserializes a string representation of a PartitionId. The string must have been created with the #encodeToString(BatchTransactionId, Partition) method.

Parameter
NameDescription
idString
Returns
TypeDescription
PartitionId

encodeToString(BatchTransactionId transactionId, Partition partition)

publicstaticStringencodeToString(BatchTransactionIdtransactionId,Partitionpartition)
Parameters
NameDescription
transactionIdBatchTransactionId
partitionPartition
Returns
TypeDescription
String

A string-encoded version of this PartitionId. This encoded version can be sent to any other Connection to be executed there, including connections on different hosts than the current host.

Methods

equals(Object o)

publicbooleanequals(Objecto)
Parameter
NameDescription
oObject
Returns
TypeDescription
boolean
Overrides

getPartition()

publicPartitiongetPartition()
Returns
TypeDescription
Partition

getTransactionId()

publicBatchTransactionIdgetTransactionId()
Returns
TypeDescription
BatchTransactionId

hashCode()

publicinthashCode()
Returns
TypeDescription
int
Overrides