Package com.tailf.ha

Class HaStatus

Object
com.tailf.ha.HaStatus

public class HaStatus extends Object
This class represents a status for an HA node in an HA cluster. First, the state says if the node is PRIMARY/SECONDARY/SECONDARY_RELAY or NONE. If the node is primary the nodes array contains representations of all the secondary nodes in the cluster.
  • Constructor Details

  • Method Details

    • getHaState

      public HaStateType getHaState()
      Get the HA node state - PRIMARY/SECONDARY/SECONDARY_RELAY/NONE
      Returns:
      HaStateType
    • getNodes

      public ConfHaNode[] getNodes()
      Get the array of secondaries for a PRIMARY HA node, the PRIMARY node for a SECONDARY HA node, or the PRIMARY and the "sub-secondaries" for a SECONDARY_RELAY HA node. When SECONDARY_RELAY nodes are used, the PRIMARY for a SECONDARY or SECONDARY_RELAY node is actually the immediate/parent, which may not be the actual cluster primary. Returns null for NONE HA nodes.
      Returns:
      array of ConfHaNode