java.lang.Object
org.apache.iotdb.confignode.manager.load.cache.AbstractLoadCache
org.apache.iotdb.confignode.manager.load.cache.node.BaseNodeCache
Direct Known Subclasses:
AINodeHeartbeatCache, ConfigNodeHeartbeatCache, DataNodeHeartbeatCache

public abstract class BaseNodeCache extends AbstractLoadCache
NodeCache caches the NodeHeartbeatSamples of a Node. Update and cache the current statistics of the Node based on the latest NodeHeartbeatSample.
  • Field Details

    • nodeId

      protected final int nodeId
  • Constructor Details

    • BaseNodeCache

      protected BaseNodeCache(int nodeId)
      Constructor for NodeCache with default NodeStatistics.
  • Method Details

    • getNodeId

      public int getNodeId()
    • getLoadScore

      public long getLoadScore()
      TODO: The loadScore of each Node will be changed to Double
      Returns:
      The latest load score of a node, the higher the score the higher the load
    • getNodeStatus

      public NodeStatus getNodeStatus()
      Returns:
      The current status of the Node.
    • getNodeStatusWithReason

      public String getNodeStatusWithReason()
      Returns:
      The reason why lead to current NodeStatus.