Package io.atomix.raft.partition
Class RaftPartitionGroupConfig
java.lang.Object
io.atomix.primitive.partition.PartitionGroupConfig<RaftPartitionGroupConfig>
io.atomix.raft.partition.RaftPartitionGroupConfig
- All Implemented Interfaces:
Config,NamedConfig<RaftPartitionGroupConfig>,TypedConfig<PartitionGroup.Type>
Raft partition group configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intReturns the default number of partitions.Returns the entry validator to be called when an entry is appended.Returns the set of members in the partition group.intReturns the partition size.Returns the storage configuration.getType()setEntryValidator(EntryValidator entryValidator) Sets the entry validator to be called when an entry is appended.setMembers(Set<String> members) Sets the set of members in the partition group.setPartitionConfig(RaftPartitionConfig partitionConfig) setReplicationFactor(int replicationFactor) Sets the partition size.setStorageConfig(RaftStorageConfig storageConfig) Sets the storage configuration.toString()Methods inherited from class io.atomix.primitive.partition.PartitionGroupConfig
getName, getPartitionCount, setName, setPartitionCount
-
Constructor Details
-
RaftPartitionGroupConfig
public RaftPartitionGroupConfig()
-
-
Method Details
-
getDefaultPartitions
protected int getDefaultPartitions()Description copied from class:PartitionGroupConfigReturns the default number of partitions.Partition group configurations should override this method to provide a default number of partitions.
- Overrides:
getDefaultPartitionsin classPartitionGroupConfig<RaftPartitionGroupConfig>- Returns:
- the default number of partitions
-
getMembers
Returns the set of members in the partition group.- Returns:
- the set of members in the partition group
-
setMembers
Sets the set of members in the partition group.- Parameters:
members- the set of members in the partition group- Returns:
- the Raft partition group configuration
-
getReplicationFactor
public int getReplicationFactor()Returns the partition size.- Returns:
- the partition size
-
setReplicationFactor
Sets the partition size.- Parameters:
replicationFactor- the partition size- Returns:
- the Raft partition group configuration
-
getStorageConfig
Returns the storage configuration.- Returns:
- the storage configuration
-
setStorageConfig
Sets the storage configuration.- Parameters:
storageConfig- the storage configuration- Returns:
- the Raft partition group configuration
-
getEntryValidator
Returns the entry validator to be called when an entry is appended.- Returns:
- the entry validator
-
setEntryValidator
Sets the entry validator to be called when an entry is appended.- Parameters:
entryValidator- the entry validator- Returns:
- the Raft Partition group builder
-
getType
-
getPartitionConfig
-
setPartitionConfig
-
toString
-