Class ConfigNodeHeartbeatCache


public class ConfigNodeHeartbeatCache extends BaseNodeCache
Heartbeat cache for cluster ConfigNodes.
  • Field Details

    • CURRENT_NODE_ID

      public static final int CURRENT_NODE_ID
      Only get CURRENT_NODE_ID here due to initialization order.
    • CURRENT_NODE_STATISTICS

      public static final NodeStatistics CURRENT_NODE_STATISTICS
  • Constructor Details

    • ConfigNodeHeartbeatCache

      public ConfigNodeHeartbeatCache(int configNodeId)
      Constructor for create ConfigNodeHeartbeatCache with default NodeStatistics.
    • ConfigNodeHeartbeatCache

      public ConfigNodeHeartbeatCache(int configNodeId, NodeStatistics statistics)
      Constructor only for ConfigNode-leader.
  • Method Details

    • updateCurrentStatistics

      public void updateCurrentStatistics(boolean forceUpdate)
      Description copied from class: AbstractLoadCache
      Update currentStatistics based on the latest heartbeat sample that cached in the slidingWindow.
      Specified by:
      updateCurrentStatistics in class AbstractLoadCache