Class PartitionId (6.62.0)

public class PartitionId implements Serializable

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)

public static PartitionId decodeFromString(String id)

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)

public static String encodeToString(BatchTransactionId transactionId, Partition partition)
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)

public boolean equals(Object o)
Parameter
NameDescription
oObject
Returns
TypeDescription
boolean
Overrides

getPartition()

public Partition getPartition()
Returns
TypeDescription
Partition

getTransactionId()

public BatchTransactionId getTransactionId()
Returns
TypeDescription
BatchTransactionId

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides