code: private <T> void submitQuery(Query<T> query, CompletableFuture<T> future) {
      QueryRequest request = QueryRequest.builder()
        .withSession(state.getSessionId())
        .withSequence(state.getCommandRequest())
        .withIndex(state.getResponseIndex())
        .withQuery(query)
        .build();
      submitQuery(request, future);
    }
docs: Submits a query to the cluster.