public interface HaStrategy
| Modifier and Type | Method and Description |
|---|---|
boolean |
isActiveNode()
Method to identify if the local node is the active node.
|
void |
registerListener(HaListener haListener,
int priority)
Method to register a listener to listen on notifications for node state changes with priority level.
|
void |
setup(org.wso2.broker.common.StartupContext startupContext)
Setup based on
StartupContext if required (eg:- read configs). |
void |
start()
Meant to be invoked when the HA strategy should start.
|
void |
stop()
Meant to be invoked when the HaStrategy should stop.
|
void |
unregisterListener(HaListener haListener)
Method to unregister a listener registered to listen on notifications for node state changes.
|
void setup(org.wso2.broker.common.StartupContext startupContext)
throws Exception
StartupContext if required (eg:- read configs).startupContext - the startup context from which registered services can be retrievedExceptionvoid start()
void stop()
boolean isActiveNode()
void registerListener(HaListener haListener, int priority)
haListener - the HaListener to registerpriority - the priority level when notifying node state changes to the haListenervoid unregisterListener(HaListener haListener)
haListener - the HaListener to unregisterCopyright © 2018 WSO2. All rights reserved.