Interface PartitionGroup

All Superinterfaces:
Configured<PartitionGroupConfig>
All Known Subinterfaces:
ManagedPartitionGroup
All Known Implementing Classes:
RaftPartitionGroup

public interface PartitionGroup extends Configured<PartitionGroupConfig>
Primitive partition group.
  • Method Details

    • name

      String name()
      Returns the partition group name.
      Returns:
      the partition group name
    • getPartition

      Partition getPartition(int partitionId)
      Returns a partition by ID. Assumes that the partition ID belongs to this group.
      Parameters:
      partitionId - the partition identifier
      Returns:
      the partition or null if no partition with the given identifier exists
    • getPartition

      Partition getPartition(PartitionId partitionId)
      Returns a partition by ID.
      Parameters:
      partitionId - the partition identifier
      Returns:
      the partition or null if no partition with the given identifier exists
      Throws:
      NullPointerException - if the partition identifier is null
    • getPartition

      default Partition getPartition(String key)
      Returns the partition for the given key.
      Parameters:
      key - the key for which to return the partition
      Returns:
      the partition for the given key
    • getPartitions

      Collection<Partition> getPartitions()
      Returns a collection of all partitions.
      Returns:
      a collection of all partitions
    • getPartitionIds

      List<PartitionId> getPartitionIds()
      Returns a sorted list of partition IDs.
      Returns:
      a sorted list of partition IDs
    • getPartitionsWithMember

      default List<Partition> getPartitionsWithMember(MemberId memberId)