The Python MasterConnection Class

The MasterConnection class extends the Connection class for HA applications.

setQuorum(quorum)

Set the number of active replicas that is acceptable (including 0) at runtime.

Example:

     
    cmaster_con = exdb.MasterConnection(db)
    params = exdb.MasterConnectionParameters()
    params.modeFlags = exdb.MCO_MASTER_MODE
    params.quorum = 1 # set initial value for HA quorum
    master_con.setReplicationMode(params)
    ...
     
    master_con.setQuorum(1) # change HA quorum at runtime