public class RdbmsCoordinationStrategy extends Object implements CoordinationStrategy
| Constructor and Description |
|---|
RdbmsCoordinationStrategy(RdbmsCoordinationDaoImpl rdbmsCoordinationDaoImpl,
CoordinationConfiguration.RdbmsCoordinationConfiguration rdbmsCoordinationConfiguration)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
becameCandidateNode()
Method to be invoked once the node becomes a candidate node.
|
void |
becameCoordinatorNode()
Method to be invoked once the node becomes the coordinator node.
|
List<NodeDetail> |
getAllNodeDetails()
Retrieve node details of all the nodes.
|
List<String> |
getAllNodeIdentifiers()
Retrieve IDs of all the nodes.
|
String |
getNodeIdentifierOfCoordinator()
Retrieve the node ID of the coordinator node.
|
boolean |
isCoordinator()
Used to query if the current node is the coordinator.
|
void |
start()
Meant to be invoked when the coordination algorithm should start working.
|
void |
stop()
Meant to be invoked when the coordination algorithm should stop working.
|
public RdbmsCoordinationStrategy(RdbmsCoordinationDaoImpl rdbmsCoordinationDaoImpl, CoordinationConfiguration.RdbmsCoordinationConfiguration rdbmsCoordinationConfiguration)
rdbmsCoordinationDaoImpl - the RdbmsCoordinationDaoImpl to use for communication with the databaserdbmsCoordinationConfiguration - the configuration for RDBMS coordinationpublic void becameCoordinatorNode()
public void becameCandidateNode()
public void start()
start in interface CoordinationStrategypublic boolean isCoordinator()
isCoordinator in interface CoordinationStrategypublic String getNodeIdentifierOfCoordinator() throws CoordinationException
getNodeIdentifierOfCoordinator in interface CoordinationStrategyCoordinationExceptionpublic List<String> getAllNodeIdentifiers() throws CoordinationException
getAllNodeIdentifiers in interface CoordinationStrategyCoordinationExceptionpublic List<NodeDetail> getAllNodeDetails() throws CoordinationException
getAllNodeDetails in interface CoordinationStrategyCoordinationExceptionpublic void stop()
stop in interface CoordinationStrategyCopyright © 2018 WSO2. All rights reserved.