code: private void sequenceQuery(QueryEntry entry, ServerSessionContext session, CompletableFuture<QueryResponse> future) {
      // If the query's sequence number is greater than the session's current sequence number, queue the request for
      // handling once the state machine is caught up.
      if (entry.getSequence() > session.getCommandSequence()) {
        session.registerSequenceQuery(entry.getSequence(), () -> indexQuery(entry, future));
      } else {
        indexQuery(entry, future);
      }
    }
docs: Sequences the given query.