public CompletableFuture<KeepAliveResponse> keepAlive(KeepAliveRequest request) {
    CompletableFuture<KeepAliveResponse> future = new CompletableFuture<>();
    if (context.isCurrentContext()) {
      sendRequest(request, protocol::keepAlive, future);
    } else {
      context.execute(() -> sendRequest(request, protocol::keepAlive, future));
    }
    return future;
  }
public CompletableFuture < KeepAliveResponse > keepAlive ( KeepAliveRequest request ) { CompletableFuture < KeepAliveResponse > future = new CompletableFuture < > ( ) ; if ( context . isCurrentContext ( ) ) { sendRequest ( request , protocol :: keepAlive , future ) ; } else { context . execute ( ( ) -> sendRequest ( request , protocol :: keepAlive , future ) ) ; } return future ; }
Sends a keep alive request to the given node.

@param request the request to send
@return a future to be completed with the response