class HousekeepingCleanupLocationManager implements CleanupLocationManager {

  @Override
  public void scheduleLocations() throws CircusTrainException {
    try {
      List<URI> uris = new ArrayList<>();
      for (CleanupLocation location : locations) {
        LOG.info("Scheduling old replica data for deletion for event {}: {}", eventId, location.path.toUri());
        housekeepingListener
            .cleanUpLocation(eventId, location.pathEventId, location.path, location.replicaDatabase,
                location.replicaTable);
        uris.add(location.path.toUri());
      }
      replicaCatalogListener.deprecatedReplicaLocations(uris);
    } finally {
      locations.clear();
    }
  }

  public  HousekeepingCleanupLocationManager(
      String eventId,
      HousekeepingListener housekeepingListener,
      ReplicaCatalogListener replicaCatalogListener,
      String replicaDatabase,
      String replicaTable);

}