Package io.atomix.primitive.partition
Class PartitionGroupConfig<C extends PartitionGroupConfig<C>>
java.lang.Object
io.atomix.primitive.partition.PartitionGroupConfig<C>
- All Implemented Interfaces:
Config,NamedConfig<C>,TypedConfig<PartitionGroup.Type>
- Direct Known Subclasses:
RaftPartitionGroupConfig
public abstract class PartitionGroupConfig<C extends PartitionGroupConfig<C>>
extends Object
implements TypedConfig<PartitionGroup.Type>, NamedConfig<C>
Partition group configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intReturns the default number of partitions.getName()intReturns the number of partitions in the group.setPartitionCount(int partitionCount) Sets the number of partitions in the group.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.atomix.utils.config.TypedConfig
getType
-
Constructor Details
-
PartitionGroupConfig
public PartitionGroupConfig()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceNamedConfig<C extends PartitionGroupConfig<C>>
-
setName
- Specified by:
setNamein interfaceNamedConfig<C extends PartitionGroupConfig<C>>
-
getPartitionCount
public int getPartitionCount()Returns the number of partitions in the group.- Returns:
- the number of partitions in the group.
-
setPartitionCount
Sets the number of partitions in the group.- Parameters:
partitionCount- the number of partitions in the group- Returns:
- the partition group configuration
-
getDefaultPartitions
protected int getDefaultPartitions()Returns the default number of partitions.Partition group configurations should override this method to provide a default number of partitions.
- Returns:
- the default number of partitions
-