class DestructiveReplication implements Replication {

  @Override
  public void replicate() throws CircusTrainException {
    try {
      if (!destructiveReplica.tableIsUnderCircusTrainControl()) {
        throw new CircusTrainException("Replica table '"
            + tableReplication.getQualifiedReplicaName()
            + "' is not controlled by circus train aborting replication, check configuration for correct replica name");
      }
      if (destructiveSource.tableExists()) {
        destructiveReplica.dropDeletedPartitions(destructiveSource.getPartitionNames());
        // do normal replication
        Replication replication = upsertReplicationFactory.newInstance(tableReplication);
        replication.replicate();
      } else {
        destructiveReplica.dropTable();
      }
    } catch (TException e) {
      throw new CircusTrainException(e);
    }
  }

  public  DestructiveReplication(
      ReplicationFactoryImpl upsertReplicationFactory,
      TableReplication tableReplication,
      String eventId,
      DestructiveSource destructiveSource,
      DestructiveReplica destructiveReplica);

}