docs: public CompletableFuture<Void> close() {
      CompletableFuture<Void> future = new CompletableFuture<>();
      threadContext.execute(() -> {
        try {
          clusterMembershipService.removeListener(membershipEventListener);
          primaryElection.removeListener(primaryElectionListener);
          role.close();
        } finally {
          future.complete(null);
        }
      });
      return future.thenRunAsync(() -> threadContext.close());
    }