See: Description
Class | Description |
---|---|
Ha |
Main class for the HA cluster management.
|
HaStatus |
This class represents a status for an HA node in an HA cluster.
|
Enum | Description |
---|---|
HaOrderType |
enum for the different HA cluster protocol operations Used internally by the
api.
|
HaStateType |
This enum describes the different states a HA node can be in.
|
Exception | Description |
---|---|
HaException |
Exception for the HA handling
|
Package for setup and control of High Availability cluster nodes.
This package is used to connect to the High Availability (HA) subsystem. Configuration data can then be replicated on several nodes in a cluster.
Example: We set up three nodes in an HA cluster, one as master and the other two as slaves, and afterwards check their state.
Socket s0 = new Socket("localhost", 4565); Socket s1 = new Socket("localhost", 4575); Socket s2 = new Socket("localhost", 4585); Ha ha0 = new Ha(s0, "clus0"); Ha ha1 = new Ha(s1, "clus0"); Ha ha2 = new Ha(s2, "clus0"); ConfHaNode master = new ConfHaNode(new ConfBuf("node0"), new ConfIPv4(InetAddress.getByName("localhost"))); ha0.beMaster(master.getNodeId()); ha1.beSlave(new ConfBuf("node1"), master, true); ha2.beSlave(new ConfBuf("node2"), master, true); HaStatus status0 = ha0.status(); HaStatus status1 = ha1.status(); HaStatus status2 = ha2.status();