class TrackedQueryManager {

  public void removeTrackedQuery(QuerySpec query) {
    query = normalizeQuery(query);
    TrackedQuery trackedQuery = findTrackedQuery(query);
    hardAssert(trackedQuery != null, "Query must exist to be removed.");

    this.storageLayer.deleteTrackedQuery(trackedQuery.id);
    Map<QueryParams, TrackedQuery> trackedQueries = this.trackedQueryTree.get(query.getPath());
    trackedQueries.remove(query.getParams());
    if (trackedQueries.isEmpty()) {
      this.trackedQueryTree = this.trackedQueryTree.remove(query.getPath());
    }
  }

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

}