Search in sources :

Example 1 with BringSiteOnlineResponse

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:");
}
Also used : BringSiteOnlineResponse(org.infinispan.xsite.status.BringSiteOnlineResponse) CacheRpcCommand(org.infinispan.commands.remote.CacheRpcCommand) ManagedOperation(org.infinispan.jmx.annotations.ManagedOperation)

Aggregations

CacheRpcCommand (org.infinispan.commands.remote.CacheRpcCommand)1 ManagedOperation (org.infinispan.jmx.annotations.ManagedOperation)1 BringSiteOnlineResponse (org.infinispan.xsite.status.BringSiteOnlineResponse)1