private void indexQuery(QueryEntry entry,ServerSessionContext session,CompletableFuture<QueryResponse> future){
  if (entry.getIndex() > session.getLastApplied()) {
    session.registerIndexQuery(entry.getIndex(),null);
  }
 else {
    applyQuery(entry,future);
  }
}

private void indexQuery ( QueryEntry entry , ServerSessionContext session , CompletableFuture < QueryResponse > future ) { if ( entry . getIndex ( ) > session . getLastApplied ( ) ) { session . registerIndexQuery ( entry . getIndex ( ) , null ) ; } else { applyQuery ( entry , future ) ; } }
ensures the given query is applied after the appropriate index .
