code: private void sendRequestAsync(final WireCommand request, final ReplyProcessor replyProcessor,
                                              final CompletableFuture<?> resultFuture,
                                              final PravegaNodeUri uri) {
          try {
              // get connection for the segment store node from the connectionManager. 
              // take a new connection from the connection manager
              CompletableFuture<ConnectionWrapper> connectionFuture = connectionManager.getConnection(uri, replyProcessor);
              connectionFuture.whenComplete((connection, e) -> connectionCompleteCallback(request, resultFuture, connection, e));
              resultFuture.whenComplete((result, e) -> requestCompleteCallback(connectionFuture, e));
          } catch (Exception e) {
              resultFuture.completeExceptionally(e);
          }
      }
docs: This method takes a new connection from the pool and associates replyProcessor with that connection and sends
  the supplied request over that connection.
  It takes a resultFuture that is completed when the response from the store is processed successfully.
  If there is a failure in establishing connection or sending the request over the wire,
  the resultFuture is completedExceptionally explicitly by this method. Otherwise, it simply registers a callback
  on result future's completion to return the connection back to the pool.
  @param request request to send.
  @param replyProcessor reply processor to associate with the connection.
  @param resultFuture A future that when completed signals completion of request processing, either via
  recieving a response from segment store or a failure (to send the request/receive a response).
  @param uri segment store uri where the request needs to be sent.