public interface TakeOfflineManager
Those condition are configured in TakeOfflineConfiguration
.
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 . |
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. |
void registerRequest(XSiteResponse response)
Handles the response for the request and takes action in case of failure.
response
- The cross-site response.SiteState getSiteState(String siteName)
siteName
.
The site can be SiteState.ONLINE
or SiteState.OFFLINE
. If it doesn't exist, SiteState.NOT_FOUND
is returned.
siteName
- The remote site name.SiteState
.void amendConfiguration(String siteName, Integer afterFailures, Long minTimeToWait)
TakeOfflineConfiguration
for site siteName
.
If the siteName
doesn't exist, this method is a no-op.
siteName
- 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.TakeOfflineConfiguration getConfiguration(String siteName)
TakeOfflineConfiguration
for site siteName
.siteName
- The remote site name.TakeOfflineConfiguration
or null
if the site siteName
doesn't exist.Map<String,Boolean> status()
Map
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
.
Map
with the site state.BringSiteOnlineResponse bringSiteOnline(String siteName)
siteName
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.
siteName
- The remote site name.BringSiteOnlineResponse
.TakeSiteOfflineResponse takeSiteOffline(String siteName)
siteName
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.
siteName
- The remote site name.TakeSiteOfflineResponse
.Copyright © 2021 JBoss by Red Hat. All rights reserved.