Package io.atomix.primitive.partition
Interface PartitionGroup
- All Superinterfaces:
Configured<PartitionGroupConfig>
- All Known Subinterfaces:
ManagedPartitionGroup
- All Known Implementing Classes:
RaftPartitionGroup
Primitive partition group.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classPartitionGroup.Builder<C extends PartitionGroupConfig<C>>Partition group builder.static interfacePartitionGroup.Type<C extends PartitionGroupConfig<C>>Partition group type. -
Method Summary
Modifier and TypeMethodDescriptiongetPartition(int partitionId) Returns a partition by ID.getPartition(PartitionId partitionId) Returns a partition by ID.default PartitiongetPartition(String key) Returns the partition for the given key.Returns a sorted list of partition IDs.Returns a collection of all partitions.getPartitionsWithMember(MemberId memberId) name()Returns the partition group name.Methods inherited from interface io.atomix.utils.config.Configured
config
-
Method Details
-
name
String name()Returns the partition group name.- Returns:
- the partition group name
-
getPartition
Returns a partition by ID. Assumes that the partition ID belongs to this group.- Parameters:
partitionId- the partition identifier- Returns:
- the partition or
nullif no partition with the given identifier exists
-
getPartition
Returns a partition by ID.- Parameters:
partitionId- the partition identifier- Returns:
- the partition or
nullif no partition with the given identifier exists - Throws:
NullPointerException- if the partition identifier isnull
-
getPartition
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
-