com.i2soft.timing.v20220622.TimingRecovery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of i2up-java-sdk Show documentation
Show all versions of i2up-java-sdk Show documentation
Information2 United Data Management Platform SDK for Java
The newest version!
package com.i2soft.timing.v20220622;
import com.i2soft.common.Auth;
import com.i2soft.http.I2Rs;
import com.i2soft.http.I2softException;
import com.i2soft.http.Response;
import com.i2soft.util.StringMap;
import java.util.Map;
public final class TimingRecovery {
/**
* Auth 对象
*/
private final Auth auth;
/**
* 构建一个新对象
*
* @param auth Auth对象
*/
public TimingRecovery(Auth auth) {
this.auth = auth;
}
/**
* 2-1 恢复 准备-2 恢复 获取还原时间点 - Mssql
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingRecoveryMssqlTime(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/rc_mssql_time", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 2-1 恢复 准备-3 恢复 获取Mssql初始信息
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeTimingRecoveryMssqlInitInfo(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/rc_mssql_init_info", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 2-1 恢复 准备-1 恢复 获取还原时间点 - 文件
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingRecoveryPathList(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/rc_path_list", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 2-1 恢复 准备-4 恢复 认证MsSql数据库
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs verifyTimingRecoveryMssqlInfo(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/rc_verify_mssql_info", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 恢复 准备 获取oracle恢复点日志
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingRecoveryOracleRcPointInfo(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/rc_sbt", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 恢复 准备 获取MySQL备份目录信息
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeRcMysqlInfo(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/rc_mysql_info", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 恢复 获取控制文件参数文件列表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listSbtContrlFile(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/sbt_contrlfile", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 恢复 获取DBID
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeSbtDbid(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/sbt_dbid", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 2-2 恢复 新建/编辑-1 恢复 新建
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs createTimingRecovery(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 2-2 恢复 新建/编辑-3 恢复 修改
*
* @param uuid: uuid
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs modifyTimingRecovery(String uuid, StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/%s", auth.cc_url, uuid);
Response r = auth.client.put(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 2-2 恢复 新建/编辑-2 恢复 获取单个
*
* @param uuid: uuid
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeTimingRecovery(String uuid) throws I2softException {
String url = String.format("%s/timing/recovery/%s", auth.cc_url, uuid);
Response r = auth.client.get(url, new StringMap());
return r.jsonToMap();
}
/**
* 2-3 恢复 列表-1 恢复 获取列表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingRecovery(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 2-3 恢复 列表-2 恢复 状态
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingRecoveryStatus(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/status", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 2-3 恢复 列表-3 恢复 删除
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map deleteTimingRecovery(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery", auth.cc_url);
Response r = auth.client.delete(url, args);
return r.jsonToMap();
}
/**
* 2-3 恢复 列表-4 恢复 操作
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs operateTimingRecovery(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/operate", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 2-4 恢复 mssql 获取单个组
*
* @param uuid: uuid
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeGroupTimingRecovery(String uuid) throws I2softException {
String url = String.format("%s/timing/recovery/%s/group", auth.cc_url, uuid);
Response r = auth.client.get(url, new StringMap());
return r.jsonToMap();
}
/**
* 恢复 检查 目录是否存在
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs timingRecoveryCheckDir(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/check_dir", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 恢复 - 准备1 - DB2获取时间列表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingRecoveryDb(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/rc_db2_time", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 恢复 获取GAUSS还原时间点
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingRecoveryGaussTime(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/gaussdb_rc_time", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 达梦 获取备份集信息
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeTimingRecoveryDmBackupInfo(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/dm_backup_info", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 还原 - 临时挂载复制卷
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map operateVolume(StringMap args) throws I2softException {
String url = String.format("%s/timing/recovery/volume_operate", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 备份 - 获取备份点信息
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTimingBackupPoint(StringMap args) throws I2softException {
String url = String.format("%s/timing/backup/bkup_point_list", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy