Package org.infinispan.xsite
Class XSiteAdminOperations
java.lang.Object
org.infinispan.xsite.XSiteAdminOperations
- All Implemented Interfaces:
CustomMetricsSupplier
@MBean(objectName="XSiteAdmin",
description="Exposes tooling for handling backing up data to remote sites.")
public class XSiteAdminOperations
extends Object
implements CustomMetricsSupplier
Managed bean exposing sys admin operations for Cross-Site replication functionality.
- Since:
- 5.2
- Author:
- Mircea Markus
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionamendTakeOffline(String site, int afterFailures, long minTimeToWait) final CompletionStage<String>asyncSetStateTransferMode(String site, String mode) bringSiteOnline(String site) final StringcancelPushState(String siteName) final StringcancelReceiveState(String siteName) booleanfinal Stringfor debug only!final Stringfinal StringgetStateTransferMode(String site) nodeStatus(String site) Obtain the status of the nodes from a sitefinal Stringfinal booleansetStateTransferMode(String site, String mode) setTakeOfflineAfterFailures(String site, int afterFailures) setTakeOfflineMinTimeToWait(String site, long minTimeToWait) siteStatus(String site) static StringsiteStatusToString(SiteStatus status) static StringsiteStatusToString(SiteStatus status, Function<CacheMixedSiteStatus, String> mixedFunction) status()takeSiteOffline(String site)
-
Field Details
-
ONLINE
- See Also:
-
FAILED
- See Also:
-
OFFLINE
- See Also:
-
SUCCESS
- See Also:
-
-
Constructor Details
-
XSiteAdminOperations
public XSiteAdminOperations()
-
-
Method Details
-
siteStatusToString
public static String siteStatusToString(SiteStatus status, Function<CacheMixedSiteStatus, String> mixedFunction) -
siteStatusToString
-
clusterStatus
-
siteStatus
-
nodeStatus
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
-
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) -
getTakeOfflineConfiguration
-
checkSite
-
bringSiteOnline
-
pushState
-
getRunningStateTransfer
for debug only! -
getPushStateStatus
-
clearPushStateStatus
@ManagedOperation(displayName="Clear State Status", description="Clears the state transfer status.", name="ClearPushStateStatus") public final String clearPushStateStatus() -
cancelPushState
-
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() -
asyncGetStateTransferMode
-
getStateTransferMode
-
asyncSetStateTransferMode
-
setStateTransferMode
-
getCustomMetrics
- Specified by:
getCustomMetricsin interfaceCustomMetricsSupplier- Returns:
- A list of
MBeanMetadata.AttributeMetadatato be registered.
-