Class XSiteAdminOperations


  • @MBean(objectName="XSiteAdmin",
           description="Exposes tooling for handling backing up data to remote sites.")
    public class XSiteAdminOperations
    extends Object
    Managed bean exposing sys admin operations for Cross-Site replication functionality.
    Since:
    5.2
    Author:
    Mircea Markus
    • Constructor Detail

      • XSiteAdminOperations

        public XSiteAdminOperations()
    • Method Detail

      • siteStatusToString

        public static String siteStatusToString​(SiteStatus status)
      • siteStatus

        @ManagedOperation(description="Check whether the given backup site is offline or not.",
                          displayName="Check whether the given backup site is offline or not.")
        public String siteStatus​(@Parameter(name="site",description="The name of the backup site")
                                 String site)
      • nodeStatus

        public Map<Address,​String> nodeStatus​(String site)
        Obtain the status of the nodes from a site
        Parameters:
        site - The name of the backup site
        Returns:
        a Map<String, String> with the Address and the status of each node in the site
      • status

        @ManagedOperation(description="Returns the the status(offline/online) of all the configured backup sites.",
                          displayName="Returns the the status(offline/online) of all the configured backup sites.")
        public String status()
      • takeSiteOffline

        @ManagedOperation(description="Takes this site offline in all nodes in the cluster.",
                          displayName="Takes this site offline in all nodes in the cluster.")
        public String takeSiteOffline​(@Parameter(name="site",description="The name of the backup site")
                                      String site)
      • setTakeOfflineAfterFailures

        @ManagedOperation(description="Amends the values for \'afterFailures\' for the \'TakeOffline\' functionality on all the nodes in the cluster.",
                          displayName="Amends the values for \'TakeOffline.afterFailures\' on all the nodes in the cluster.")
        public String setTakeOfflineAfterFailures​(@Parameter(name="site",description="The name of the backup site")
                                                  String site,
                                                  @Parameter(name="afterFailures",description="The number of failures after which the site will be taken offline")
                                                  int afterFailures)
      • setTakeOfflineMinTimeToWait

        @ManagedOperation(description="Amends the values for \'minTimeToWait\' for the \'TakeOffline\' functionality on all the nodes in the cluster.",
                          displayName="Amends the values for \'TakeOffline.minTimeToWait\' on all the nodes in the cluster.")
        public String setTakeOfflineMinTimeToWait​(@Parameter(name="site",description="The name of the backup site")
                                                  String site,
                                                  @Parameter(name="minTimeToWait",description="The minimum amount of time in milliseconds to wait before taking a site offline")
                                                  long minTimeToWait)
      • amendTakeOffline

        @ManagedOperation(description="Amends the values for \'TakeOffline\' functionality on all the nodes in the cluster.",
                          displayName="Amends the values for \'TakeOffline\' functionality on all the nodes in the cluster.")
        public String amendTakeOffline​(@Parameter(name="site",description="The name of the backup site")
                                       String site,
                                       @Parameter(name="afterFailures",description="The number of failures after which the site will be taken offline")
                                       int afterFailures,
                                       @Parameter(name="minTimeToWait",description="The minimum amount of time in milliseconds to wait before taking a site offline")
                                       long minTimeToWait)
      • getTakeOfflineMinTimeToWait

        @ManagedOperation(description="Returns the value of the \'minTimeToWait\' for the \'TakeOffline\' functionality.",
                          displayName="Returns the value of the \'minTimeToWait\' for the \'TakeOffline\' functionality.")
        public String getTakeOfflineMinTimeToWait​(@Parameter(name="site",description="The name of the backup site")
                                                  String site)
      • getTakeOfflineAfterFailures

        @ManagedOperation(description="Returns the value of the \'afterFailures\' for the \'TakeOffline\' functionality.",
                          displayName="Returns the value of the \'afterFailures\' for the \'TakeOffline\' functionality.")
        public String getTakeOfflineAfterFailures​(@Parameter(name="site",description="The name of the backup site")
                                                  String site)
      • checkSite

        public boolean checkSite​(String site)
      • 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)
      • pushState

        @ManagedOperation(displayName="Push state to site",
                          description="Pushes the state of this cache to the remote site. The remote site will be bring back online",
                          name="pushState")
        public final String pushState​(@Parameter(description="The destination site name",name="SiteName")
                                      String siteName)
      • getRunningStateTransfer

        public final List<String> getRunningStateTransfer()
        for debug only!
      • getPushStateStatus

        @ManagedOperation(displayName="Push State Status",
                          description="Shows a map with destination site name and the state transfer status.",
                          name="PushStateStatus")
        public final Map<String,​String> getPushStateStatus()
      • clearPushStateStatus

        @ManagedOperation(displayName="Clear State Status",
                          description="Clears the state transfer status.",
                          name="ClearPushStateStatus")
        public final String clearPushStateStatus()
      • cancelPushState

        @ManagedOperation(displayName="Cancel Push Status",
                          description="Cancels the push state to remote site.",
                          name="CancelPushState")
        public final String cancelPushState​(@Parameter(description="The destination site name",name="SiteName")
                                            String siteName)
      • cancelReceiveState

        @ManagedOperation(displayName="Cancel Receive State",
                          description="Cancels the push state to this site. All the state received from state transfer will be ignored.",
                          name="CancelReceiveState")
        public final String cancelReceiveState​(@Parameter(description="The sending site name",name="SiteName")
                                               String siteName)
      • getSendingSiteName

        @ManagedOperation(displayName="Sending Site Name",
                          description="Returns the site name from which this site is receiving state.",
                          name="SendingSiteName")
        public final String getSendingSiteName()