CompletableFuture<Partition> join(
      PartitionManagementService managementService,
      ThreadContextFactory threadFactory) {
    election = managementService.getElectionService().getElectionFor(partitionId);
    server = new LogPartitionServer(
        this,
        managementService,
        config,
        threadFactory);
    client = new LogPartitionClient(this, managementService, threadFactory);
    return server.start().thenCompose(v -> client.start()).thenApply(v -> this);
  }
CompletableFuture < Partition > join ( PartitionManagementService managementService , ThreadContextFactory threadFactory ) { election = managementService . getElectionService ( ) . getElectionFor ( partitionId ) ; server = new LogPartitionServer ( this , managementService , config , threadFactory ) ; client = new LogPartitionClient ( this , managementService , threadFactory ) ; return server . start ( ) . thenCompose ( v -> client . start ( ) ) . thenApply ( v -> this ) ; }
Joins the log partition.