Search in sources :

Example 1 with MemberGroupProvider

use of io.atomix.primitive.partition.MemberGroupProvider 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);
}
Also used : NodeId(io.atomix.cluster.NodeId) Collection(java.util.Collection) CompletableFuture(java.util.concurrent.CompletableFuture) PrimaryBackupPartitionClient(io.atomix.protocols.backup.partition.impl.PrimaryBackupPartitionClient) Collectors(java.util.stream.Collectors) Member(io.atomix.primitive.partition.Member) PartitionId(io.atomix.primitive.partition.PartitionId) ThreadContextFactory(io.atomix.utils.concurrent.ThreadContextFactory) PrimaryBackupPartitionServer(io.atomix.protocols.backup.partition.impl.PrimaryBackupPartitionServer) Partition(io.atomix.primitive.partition.Partition) PartitionManagementService(io.atomix.primitive.partition.PartitionManagementService) PrimaryElection(io.atomix.primitive.partition.PrimaryElection) MemberGroupProvider(io.atomix.primitive.partition.MemberGroupProvider) MultiPrimaryProtocol(io.atomix.protocols.backup.MultiPrimaryProtocol) PrimitiveClient(io.atomix.primitive.PrimitiveClient) MoreObjects.toStringHelper(com.google.common.base.MoreObjects.toStringHelper) PrimaryBackupPartitionClient(io.atomix.protocols.backup.partition.impl.PrimaryBackupPartitionClient) PrimaryBackupPartitionServer(io.atomix.protocols.backup.partition.impl.PrimaryBackupPartitionServer)

Aggregations

MoreObjects.toStringHelper (com.google.common.base.MoreObjects.toStringHelper)1 NodeId (io.atomix.cluster.NodeId)1 PrimitiveClient (io.atomix.primitive.PrimitiveClient)1 Member (io.atomix.primitive.partition.Member)1 MemberGroupProvider (io.atomix.primitive.partition.MemberGroupProvider)1 Partition (io.atomix.primitive.partition.Partition)1 PartitionId (io.atomix.primitive.partition.PartitionId)1 PartitionManagementService (io.atomix.primitive.partition.PartitionManagementService)1 PrimaryElection (io.atomix.primitive.partition.PrimaryElection)1 MultiPrimaryProtocol (io.atomix.protocols.backup.MultiPrimaryProtocol)1 PrimaryBackupPartitionClient (io.atomix.protocols.backup.partition.impl.PrimaryBackupPartitionClient)1 PrimaryBackupPartitionServer (io.atomix.protocols.backup.partition.impl.PrimaryBackupPartitionServer)1 ThreadContextFactory (io.atomix.utils.concurrent.ThreadContextFactory)1 Collection (java.util.Collection)1 CompletableFuture (java.util.concurrent.CompletableFuture)1 Collectors (java.util.stream.Collectors)1