@Public
@Evolving
public interface HAServiceProtocol
| Modifier and Type | Interface | Description |
|---|---|---|
static class |
HAServiceProtocol.HAServiceState |
An HA service may be in active or standby state.
|
static class |
HAServiceProtocol.RequestSource |
|
static class |
HAServiceProtocol.StateChangeRequestInfo |
Information describing the source for a request to change state.
|
| Modifier and Type | Field | Description |
|---|---|---|
static long |
versionID |
Initial version of the protocol
|
| Modifier and Type | Method | Description |
|---|---|---|
HAServiceStatus |
getServiceStatus() |
Return the current status of the service.
|
void |
monitorHealth() |
Monitor the health of service.
|
void |
transitionToActive(HAServiceProtocol.StateChangeRequestInfo reqInfo) |
Request service to transition to active state.
|
void |
transitionToObserver(HAServiceProtocol.StateChangeRequestInfo reqInfo) |
Request service to transition to observer state.
|
void |
transitionToStandby(HAServiceProtocol.StateChangeRequestInfo reqInfo) |
Request service to transition to standby state.
|
static final long versionID
void monitorHealth()
throws HealthCheckFailedException,
AccessControlException,
java.io.IOException
HealthCheckFailedException.
The definition of service not healthy is left to the service.
Note that when health check of an Active service fails,
failover to standby may be done.HealthCheckFailedException - if the health check of a service fails.AccessControlException - if access is denied.java.io.IOException - if other errors happenvoid transitionToActive(HAServiceProtocol.StateChangeRequestInfo reqInfo) throws ServiceFailedException, AccessControlException, java.io.IOException
reqInfo - reqInfo.ServiceFailedException - if transition from standby to active fails.AccessControlException - if access is denied.java.io.IOException - if other errors happenvoid transitionToStandby(HAServiceProtocol.StateChangeRequestInfo reqInfo) throws ServiceFailedException, AccessControlException, java.io.IOException
reqInfo - reqInfo.ServiceFailedException - if transition from active to standby fails.AccessControlException - if access is denied.java.io.IOException - if other errors happenvoid transitionToObserver(HAServiceProtocol.StateChangeRequestInfo reqInfo) throws ServiceFailedException, AccessControlException, java.io.IOException
reqInfo - reqInfo.ServiceFailedException - if transition from standby to observer fails.AccessControlException - if access is denied.java.io.IOException - if other errors happenHAServiceStatus getServiceStatus() throws AccessControlException, java.io.IOException
AccessControlException - if access is denied.java.io.IOException - if other errors happenHAServiceStatusCopyright © 2008–2025 Apache Software Foundation. All rights reserved.