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 MasterParams = new MasterConnection.Parameters();
MasterParams.Quorum = 1; /* set initial value for HA quorum */
con.SetReplicationMode(MasterParams);
...
con.SetQuorum(0); /* change HA quorum at runtime */