@Override
  public CompletableFuture<ServerName> getActiveMaster() {
    CompletableFuture<ServerName> future = new CompletableFuture<>();
    Optional<ServerName> activeMaster = endpoint.getActiveMaster();
    if (activeMaster.isPresent()) {
      future.complete(activeMaster.get());
    } else {
      future.completeExceptionally(new IOException("no active master available"));
    }
    return future;
  }
A {@link ConnectionRegistry} implementation used at server side, where we could use the
{@link ConnectionRegistryEndpoint} directly, without any rpcs.
hbase-server/src/main/java/org/apache/hadoop/hbase/client/ShortCircuitConnectionRegistry.java