class TrackedQueryManager {

  public boolean isQueryComplete(QuerySpec query) {
    if (this.includedInDefaultCompleteQuery(query.getPath())) {
      return true;
    } else if (query.loadsAllData()) {
      // We didn't find a default complete query, so must not be complete.
      return false;
    } else {
      Map<QueryParams, TrackedQuery> trackedQueries = this.trackedQueryTree.get(query.getPath());
      return trackedQueries != null
          && trackedQueries.containsKey(query.getParams())
          && trackedQueries.get(query.getParams()).complete;
    }
  }

  public  TrackedQueryManager(
      PersistenceStorageEngine storageLayer, LogWrapper logger, Clock clock);

}