Class MaxwellHA


  • public class MaxwellHA
    extends Object
    Class that joins a jgroups-raft cluster of servers
    • Constructor Detail

      • MaxwellHA

        public MaxwellHA​(Maxwell maxwell,
                         String jgroupsConf,
                         String raftMemberID,
                         String clientID)
        Build a MaxwellHA object
        Parameters:
        maxwell - The Maxwell instance that will be run when an election is won
        jgroupsConf - Path to an xml file that will configure the RAFT cluster
        raftMemberID - unique ID identifying the raft member in the cluster
        clientID - The maxwell clientID. Used to create a unique "channel" for the election
    • Method Detail

      • startHA

        public void startHA()
                     throws Exception
        Join the raft cluster, starting and stopping Maxwell on elections. Does not return.
        Throws:
        Exception - if there's any issues