Search in sources :

Example 1 with RaftStorageConfig

use of io.atomix.protocols.raft.partition.RaftStorageConfig in project atomix by atomix.

the class ConsensusProfile method configure.

@Override
public void configure(AtomixConfig config) {
    config.setManagementGroup(new RaftPartitionGroupConfig().setName(this.config.getManagementGroup()).setPartitionSize(this.config.getMembers().size()).setPartitions(1).setMembers(this.config.getMembers()).setStorageConfig(new RaftStorageConfig().setDirectory(String.format("%s/%s", this.config.getDataPath(), this.config.getManagementGroup()))));
    config.addPartitionGroup(new RaftPartitionGroupConfig().setName(this.config.getDataGroup()).setPartitionSize(this.config.getPartitionSize()).setPartitions(this.config.getPartitions()).setMembers(this.config.getMembers()).setStorageConfig(new RaftStorageConfig().setDirectory(String.format("%s/%s", this.config.getDataPath(), this.config.getDataGroup()))));
}
Also used : RaftPartitionGroupConfig(io.atomix.protocols.raft.partition.RaftPartitionGroupConfig) RaftStorageConfig(io.atomix.protocols.raft.partition.RaftStorageConfig)

Aggregations

RaftPartitionGroupConfig (io.atomix.protocols.raft.partition.RaftPartitionGroupConfig)1 RaftStorageConfig (io.atomix.protocols.raft.partition.RaftStorageConfig)1