Interface PartitionManager


public interface PartitionManager
The partition manager provides the ability to obtain information about table partitions. This interface can be used to get all partitions of a table, the location of the primary replica of a partition, the partition for a specific table key.
  • Method Details

    • primaryReplicaAsync

      CompletableFuture<ClusterNode> primaryReplicaAsync(Partition partition)
      Returns location of primary replica for provided partition.
      Parameters:
      partition - Partition instance.
      Returns:
      Cluster node where primary replica of provided partition is located.
    • primaryReplicasAsync

      CompletableFuture<Map<Partition,ClusterNode>> primaryReplicasAsync()
      Returns map with all partitions and their locations.
      Returns:
      Map from partition to cluster node where primary replica of the partition is located.
    • partitionAsync

      <K> CompletableFuture<Partition> partitionAsync(K key, Mapper<K> mapper)
      Returns partition instance for provided table key.
      Type Parameters:
      K - Key type.
      Parameters:
      key - Table key.
      mapper - Table key mapper.
      Returns:
      Partition instance which contains provided key.
    • partitionAsync

      CompletableFuture<Partition> partitionAsync(Tuple key)
      Returns partition instance for provided table key.
      Parameters:
      key - Table key tuple.
      Returns:
      Partition instance which contains provided key.