Package org.infinispan.xsite.status
Class NoOpTakeOfflineManager
java.lang.Object
org.infinispan.xsite.status.NoOpTakeOfflineManager
- All Implemented Interfaces:
org.infinispan.metrics.impl.CustomMetricsSupplier,TakeOfflineManager
An empty
TakeOfflineManager implementation for caches which don't backup any data to remote sites.- Since:
- 11.0
- Author:
- Pedro Ruivo
-
Method Summary
Modifier and TypeMethodDescriptionvoidamendConfiguration(String siteName, Integer afterFailures, Long minTimeToWait) It changes theTakeOfflineConfigurationfor sitesiteName.bringSiteOnline(String siteName) It changes the sitesiteNameto online.getConfiguration(String siteName) It returns the currentTakeOfflineConfigurationfor sitesiteName.static NoOpTakeOfflineManagergetSiteState(String siteName) Returns the site state for sitesiteName.voidregisterRequest(XSiteResponse response) Registers a cross-site request made.status()It returns aMapwith the sites name and their state (Online or Offline).takeSiteOffline(String siteName) It changes the sitesiteNameto offline.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.xsite.status.TakeOfflineManager
getCustomMetrics
-
Method Details
-
getInstance
-
registerRequest
Description copied from interface:TakeOfflineManagerRegisters a cross-site request made.Handles the response for the request and takes action in case of failure.
- Specified by:
registerRequestin interfaceTakeOfflineManager- Parameters:
response- The cross-site response.
-
getSiteState
Description copied from interface:TakeOfflineManagerReturns the site state for sitesiteName.The site can be
SiteState.ONLINEorSiteState.OFFLINE. If it doesn't exist,SiteState.NOT_FOUNDis returned.- Specified by:
getSiteStatein interfaceTakeOfflineManager- Parameters:
siteName- The remote site name.- Returns:
- The
SiteState.
-
amendConfiguration
Description copied from interface:TakeOfflineManagerIt changes theTakeOfflineConfigurationfor sitesiteName.If the
siteNamedoesn't exist, this method is a no-op.- Specified by:
amendConfigurationin interfaceTakeOfflineManager- Parameters:
siteName- The remote site name.afterFailures- The newTakeOfflineConfigurationBuilder.afterFailures(int)ornullfor no changes.minTimeToWait- The newTakeOfflineConfigurationBuilder.minTimeToWait(long)ornullfor no changes.
-
getConfiguration
Description copied from interface:TakeOfflineManagerIt returns the currentTakeOfflineConfigurationfor sitesiteName.- Specified by:
getConfigurationin interfaceTakeOfflineManager- Parameters:
siteName- The remote site name.- Returns:
- The current
TakeOfflineConfigurationornullif the sitesiteNamedoesn't exist.
-
status
Description copied from interface:TakeOfflineManagerIt returns aMapwith the sites name and their state (Online or Offline).If a site is online, then its value is
Boolean.TRUE, otherwise isBoolean.FALSE.- Specified by:
statusin interfaceTakeOfflineManager- Returns:
- A
Mapwith the site state.
-
bringSiteOnline
Description copied from interface:TakeOfflineManagerIt changes the sitesiteNameto online.If the site is already online, then
BringSiteOnlineResponse.ALREADY_ONLINEis returned. If it doesn't exits,BringSiteOnlineResponse.NO_SUCH_SITEis returned.- Specified by:
bringSiteOnlinein interfaceTakeOfflineManager- Parameters:
siteName- The remote site name.- Returns:
- The
BringSiteOnlineResponse.
-
takeSiteOffline
Description copied from interface:TakeOfflineManagerIt changes the sitesiteNameto offline.If the site is already offline, then
TakeSiteOfflineResponse.ALREADY_OFFLINEis returned. If it doesn't exits,TakeSiteOfflineResponse.NO_SUCH_SITEis returned.- Specified by:
takeSiteOfflinein interfaceTakeOfflineManager- Parameters:
siteName- The remote site name.- Returns:
- The
TakeSiteOfflineResponse.
-