use of org.infinispan.xsite.status.BringSiteOnlineResponse in project infinispan by infinispan.
the class XSiteAdminOperations method bringSiteOnline.
@ManagedOperation(description = "Brings the given site back online on all the cluster.", displayName = "Brings the given site back online on all the cluster.")
public String bringSiteOnline(@Parameter(name = "site", description = "The name of the backup site") String site) {
authorizer.checkPermission(AuthorizationPermission.ADMIN);
BringSiteOnlineResponse rsp = takeOfflineManager.bringSiteOnline(site);
if (rsp == BringSiteOnlineResponse.NO_SUCH_SITE) {
return incorrectSiteName(site);
}
CacheRpcCommand command = commandsFactory.buildXSiteBringOnlineCommand(site);
XSiteResponse<Void> response = invokeOnAll(command, new VoidResponseCollector(clusterSize()));
return returnFailureOrSuccess(response.getErrors(), "Could not take the site online on nodes:");
}
Aggregations