use of org.apache.geode.internal.cache.persistence.BackupManager in project geode by apache.
the class PrepareBackupRequest method createResponse.
@Override
protected AdminResponse createResponse(DistributionManager dm) {
InternalCache cache = GemFireCacheImpl.getInstance();
HashSet<PersistentID> persistentIds;
if (cache == null) {
persistentIds = new HashSet<>();
} else {
try {
BackupManager manager = cache.startBackup(getSender());
persistentIds = manager.prepareBackup();
} catch (IOException e) {
logger.error(LocalizedMessage.create(LocalizedStrings.CliLegacyMessage_ERROR, this.getClass()), e);
return AdminFailureResponse.create(dm, getSender(), e);
}
}
return new PrepareBackupResponse(this.getSender(), persistentIds);
}
Aggregations