Class PartitionId (6.66.0)

public final 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
Name Description
id String
Returns
Type Description
PartitionId

encodeToString(BatchTransactionId transactionId, Partition partition)

public static String encodeToString(BatchTransactionId transactionId, Partition partition)
Parameters
Name Description
transactionId BatchTransactionId
partition Partition
Returns
Type Description
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
Name Description
o Object
Returns
Type Description
boolean
Overrides

getPartition()

public Partition getPartition()
Returns
Type Description
Partition

getTransactionId()

public BatchTransactionId getTransactionId()
Returns
Type Description
BatchTransactionId

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides