Examples of promoteSlaveToMaster()


Examples of com.mysql.jdbc.ReplicationConnection.promoteSlaveToMaster()

    assertFalse(conn2.isHostMaster(thirdHost));
    conn2.setReadOnly(false);

    // failover to "second" as master, "first"
    // can still be used:
    conn2.promoteSlaveToMaster(secondHost);
    assertTrue(conn2.isHostMaster(firstHost));
    assertFalse(conn2.isHostSlave(firstHost));
    assertFalse(conn2.isHostSlave(secondHost));
    assertTrue(conn2.isHostMaster(secondHost));
    assertTrue(conn2.isHostSlave(thirdHost));
View Full Code Here

Examples of com.mysql.jdbc.ReplicationConnection.promoteSlaveToMaster()

    assertFalse(conn2.isHostMaster(thirdHost));
   
    conn2.removeMasterHost(firstHost);

    // "first" should no longer be used:
    conn2.promoteSlaveToMaster(secondHost);
    assertTrue(conn2.isHostMaster(firstHost));
    assertFalse(conn2.isHostSlave(firstHost));
    assertFalse(conn2.isHostSlave(secondHost));
    assertTrue(conn2.isHostMaster(secondHost));
    assertTrue(conn2.isHostSlave(thirdHost));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.