use of org.apache.geode.admin.DistributedSystemConfig in project geode by apache.
the class IncrementalBackupDUnitTest method incremental.
/**
* Invokes {@link AdminDistributedSystem#backupAllMembers(File, File)} on a member.
*
* @param vm a member of the distributed system.
* @return a status of the backup operation.
*/
private BackupStatus incremental(VM vm) {
return (BackupStatus) vm.invoke(new SerializableCallable("Backup all members.") {
@Override
public Object call() {
DistributedSystemConfig config;
AdminDistributedSystem adminDS = null;
try {
config = AdminDistributedSystemFactory.defineDistributedSystem(getSystem(), "");
adminDS = AdminDistributedSystemFactory.getDistributedSystem(config);
adminDS.connect();
return adminDS.backupAllMembers(getIncrementalDir(), getBaselineBackupDir());
} catch (AdminException e) {
throw new RuntimeException(e);
} finally {
if (adminDS != null) {
adminDS.disconnect();
}
}
}
});
}
Aggregations