CompletableFuture < Partition > join ( 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 ) ; }
Joins the primary - backup partition .