public class NoOpTakeOfflineManager extends Object implements TakeOfflineManager
TakeOfflineManager implementation for caches which don't backup any data to remote sites.| Modifier and Type | Method and Description |
|---|---|
void |
amendConfiguration(String siteName,
Integer afterFailures,
Long minTimeToWait)
It changes the
TakeOfflineConfiguration for site siteName. |
BringSiteOnlineResponse |
bringSiteOnline(String siteName)
It changes the site
siteName to online. |
TakeOfflineConfiguration |
getConfiguration(String siteName)
It returns the current
TakeOfflineConfiguration for site siteName. |
static NoOpTakeOfflineManager |
getInstance() |
SiteState |
getSiteState(String siteName)
Returns the site state for site
siteName. |
void |
registerRequest(XSiteResponse response)
Registers a cross-site request made.
|
Map<String,Boolean> |
status()
It returns a
Map with the sites name and their state (Online or Offline). |
TakeSiteOfflineResponse |
takeSiteOffline(String siteName)
It changes the site
siteName to offline. |
public static NoOpTakeOfflineManager getInstance()
public void registerRequest(XSiteResponse response)
TakeOfflineManagerHandles the response for the request and takes action in case of failure.
registerRequest in interface TakeOfflineManagerresponse - The cross-site response.public SiteState getSiteState(String siteName)
TakeOfflineManagersiteName.
The site can be SiteState.ONLINE or SiteState.OFFLINE. If it doesn't exist, SiteState.NOT_FOUND is returned.
getSiteState in interface TakeOfflineManagersiteName - The remote site name.SiteState.public void amendConfiguration(String siteName, Integer afterFailures, Long minTimeToWait)
TakeOfflineManagerTakeOfflineConfiguration for site siteName.
If the siteName doesn't exist, this method is a no-op.
amendConfiguration in interface TakeOfflineManagersiteName - The remote site name.afterFailures - The new TakeOfflineConfigurationBuilder.afterFailures(int) or null for no
changes.minTimeToWait - The new TakeOfflineConfigurationBuilder.minTimeToWait(long) or null for no
changes.public TakeOfflineConfiguration getConfiguration(String siteName)
TakeOfflineManagerTakeOfflineConfiguration for site siteName.getConfiguration in interface TakeOfflineManagersiteName - The remote site name.TakeOfflineConfiguration or null if the site siteName doesn't exist.public Map<String,Boolean> status()
TakeOfflineManagerMap with the sites name and their state (Online or Offline).
If a site is online, then its value is Boolean.TRUE, otherwise is Boolean.FALSE.
status in interface TakeOfflineManagerMap with the site state.public BringSiteOnlineResponse bringSiteOnline(String siteName)
TakeOfflineManagersiteName to online.
If the site is already online, then BringSiteOnlineResponse.ALREADY_ONLINE is returned. If it doesn't
exits, BringSiteOnlineResponse.NO_SUCH_SITE is returned.
bringSiteOnline in interface TakeOfflineManagersiteName - The remote site name.BringSiteOnlineResponse.public TakeSiteOfflineResponse takeSiteOffline(String siteName)
TakeOfflineManagersiteName to offline.
If the site is already offline, then TakeSiteOfflineResponse.ALREADY_OFFLINE is returned. If it doesn't
exits, TakeSiteOfflineResponse.NO_SUCH_SITE is returned.
takeSiteOffline in interface TakeOfflineManagersiteName - The remote site name.TakeSiteOfflineResponse.Copyright © 2022 JBoss by Red Hat. All rights reserved.