This method is called by the master to set the HA quorum at runtime.
public void setQuorum(int quorum);
| quorum | The number of active replicas that is acceptable (including 0) |
This function is called by the master to set the HA quorum at runtime. Note that a value of quorum greater than 0 is allowed only for synchronous replication mode.
No value returned.
MasterConnection con = new MasterConnection(db);
MasterConnection.Parameters ha_params = new MasterConnection.Parameters();
ha_params.quorum = 1; /* set initial value for HA quorum */
con.setReplicationMode(ha_params);
...
con.setQuorum(0); /* change HA quorum at runtime */