class ReplicaFactory implements HiveEndpointFactory<Replica> {

  @Override
  public Replica newInstance(TableReplication tableReplication) {
    ReplicaTableFactory replicaTableFactory = replicaTableFactoryPicker.newInstance(tableReplication);
    DropTableService dropTableService = new DropTableService();
    AlterTableService alterTableService = new AlterTableService(dropTableService, new CopyPartitionsOperation(),
        new RenameTableOperation(dropTableService));
    return new Replica(replicaCatalog, replicaHiveConf, replicaMetaStoreClientSupplier, replicaTableFactory,
        housekeepingListener, replicaCatalogListener, tableReplication, alterTableService);
  }

  @Autowired public  ReplicaFactory(
      ReplicaCatalog replicaCatalog,
      @Value("#{replicaHiveConf}") HiveConf replicaHiveConf,
      Supplier<CloseableMetaStoreClient> replicaMetaStoreClientSupplier,
      HousekeepingListener housekeepingListener,
      ReplicaCatalogListener replicaCatalogListener,
      ReplicaTableFactoryProvider replicaTableFactoryProvider);

}