package com.njcn.gather.systemops.database.support.spi;

import com.njcn.gather.systemops.database.pojo.param.DatabaseRestoreParam;
import com.njcn.gather.systemops.database.pojo.po.DatabaseBackupFile;
import com.njcn.gather.systemops.database.pojo.po.DatabaseConnection;
import com.njcn.gather.systemops.database.pojo.po.DatabaseOperationTask;
import com.njcn.gather.systemops.database.pojo.po.DatabaseRestoreRecord;

/**
 * 按数据库类型与备份策略隔离恢复执行能力。
 */
public interface DatabaseRestoreOperator {

    boolean support(String dbType, String backupStrategy);

    void executeRestore(DatabaseOperationTask task, DatabaseRestoreRecord record, DatabaseBackupFile backupFile,
                        DatabaseConnection connection, String password, DatabaseRestoreParam.CreateParam param) throws Exception;
}
