use of io.atomix.protocols.backup.partition.impl.PrimaryBackupPartitionServer in project atomix by atomix.
the class PrimaryBackupPartition method open.
/**
* Opens the primary-backup partition.
*/
CompletableFuture<Partition> open(PartitionManagementService managementService, ThreadContextFactory threadFactory) {
election = managementService.getElectionService().getElectionFor(partitionId);
server = new PrimaryBackupPartitionServer(this, managementService, memberGroupProvider, threadFactory);
client = new PrimaryBackupPartitionClient(this, managementService, threadFactory);
return server.start().thenCompose(v -> client.start()).thenApply(v -> this);
}
Aggregations