Interface PartitionGroup

All Superinterfaces:
io.atomix.utils.config.Configured<PartitionGroupConfig>
All Known Subinterfaces:
ManagedPartitionGroup

public interface PartitionGroup
extends io.atomix.utils.config.Configured<PartitionGroupConfig>
Primitive partition group.
  • Method Details

    • name

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

      Returns the partition group type.
      Returns:
      the partition group type
    • protocol

      Returns the primitive protocol type supported by the partition group.
      Returns:
      the primitive protocol type supported by the partition group
    • newProtocol

      ProxyProtocol newProtocol()
      Returns a new primitive protocol.
      Returns:
      a new primitive protocol
    • 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
    • snapshot

      default CompletableFuture<Void> snapshot​(PartitionId partitionId)
      Takes a snapshot of the partition.
      Parameters:
      partitionId - the partition identifier
      Returns:
      a future to be completed once the snapshot is complete
    • snapshot

      default CompletableFuture<Void> snapshot()
      Takes snapshots of all partitions.
      Returns:
      a future to be completed once snapshots have been taken