class CleanupLocationManagerFactory {

  public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener,
    ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) {
    if (tableReplication.getReplicationMode() == ReplicationMode.FULL &&
      tableReplication.getOrphanedDataStrategy() == OrphanedDataStrategy.HOUSEKEEPING) {
      return new HousekeepingCleanupLocationManager(eventId, housekeepingListener, replicaCatalogListener,
        tableReplication.getReplicaDatabaseName(), tableReplication.getReplicaTableName());
    } else {
      return CleanupLocationManager.NULL_CLEANUP_LOCATION_MANAGER;
    }
  }

}