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
A Managed bean exposing system administration operations for Cross-Site replication functionality (cache scope only)
- Since:
- 5.2
- Author:
- Mircea Markus
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionamendTakeOffline
(String site, int afterFailures, long minTimeToWait) final CompletionStage
<String> asyncSetStateTransferMode
(String site, String mode) bringSiteOnline
(String site) final String
cancelPushState
(String siteName) final String
cancelReceiveState
(String siteName) boolean
final String
Collection
<org.infinispan.commons.stat.MetricInfo> getCustomMetrics
(GlobalMetricsConfiguration configuration) Extra metrics to be registered.For debugging only!final String
final String
getStateTransferMode
(String site) nodeStatus
(String site) Gets the status of the nodes from a sitefinal String
final boolean
setStateTransferMode
(String site, String mode) setTakeOfflineAfterFailures
(String site, int afterFailures) setTakeOfflineMinTimeToWait
(String site, long minTimeToWait) siteStatus
(String site) static String
siteStatusToString
(SiteStatus status) static String
siteStatusToString
(SiteStatus status, Function<CacheMixedSiteStatus, String> mixedFunction) status()
takeSiteOffline
(String site)
-
Field Details
-
ONLINE
- 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
Gets 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 debugging 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
public Collection<org.infinispan.commons.stat.MetricInfo> getCustomMetrics(GlobalMetricsConfiguration configuration) Description copied from interface:CustomMetricsSupplier
Extra metrics to be registered.These can be dynamic metrics that cannot use
ManagedAttribute
annotation. Extra tags can be set inMBeanMetadata.AttributeMetadata
.- Specified by:
getCustomMetrics
in interfaceCustomMetricsSupplier
- Parameters:
configuration
- TheGlobalMetricsConfiguration
. Implementation can make decision based onGlobalMetricsConfiguration.namesAsTags()
orGlobalMetricsConfiguration.histograms()
.- Returns:
- A list of
MBeanMetadata.AttributeMetadata
to be registered.
-