Class ClusterControl

java.lang.Object
io.aeron.cluster.ClusterControl

public class ClusterControl extends Object
Toggle control ClusterControl.ToggleStates for a cluster node such as ClusterControl.ToggleState.SUSPEND or ClusterControl.ToggleState.RESUME. This can only be applied to the Cluster.Role.LEADER.
  • Field Details

    • CONTROL_TOGGLE_TYPE_ID

      public static final int CONTROL_TOGGLE_TYPE_ID
      Counter type id for the control toggle.
      See Also:
  • Constructor Details

    • ClusterControl

      public ClusterControl()
  • Method Details

    • mapCounters

      public static CountersReader mapCounters(File cncFile)
      Map a CountersReader over the provided File for the CnC file.
      Parameters:
      cncFile - for the counters.
      Returns:
      a CountersReader over the provided CnC file.
    • findControlToggle

      public static AtomicCounter findControlToggle(CountersReader counters, int clusterId)
      Find the control toggle counter or return null if not found.
      Parameters:
      counters - to search within.
      clusterId - to which the allocated counter belongs.
      Returns:
      the control toggle counter or return null if not found.
    • main

      public static void main(String[] args)
      Main method for launching the process.
      Parameters:
      args - passed to the process.