SetQuorum

This method is called by the master to set the HA quorum at runtime.

For an overview see page HA Applications

Prototype

 
    public void SetQuorum(int quorum);
 

Arguments

quorum The number of active replicas that is acceptable (including 0)

Description

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.

Return Codes

No value returned.

Example

     
    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 */