Class BaseNodeCache
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
NodeCache caches the NodeHeartbeatSamples of a Node. Update and cache the current statistics of
the Node based on the latest NodeHeartbeatSample.
-
Field Summary
FieldsFields inherited from class org.apache.iotdb.confignode.manager.load.cache.AbstractLoadCache
currentStatistics, failureDetector, slidingWindow -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseNodeCache(int nodeId) Constructor for NodeCache with default NodeStatistics. -
Method Summary
Modifier and TypeMethodDescriptionlongTODO: The loadScore of each Node will be changed to DoubleintMethods inherited from class org.apache.iotdb.confignode.manager.load.cache.AbstractLoadCache
cacheHeartbeatSample, getCurrentStatistics, getLastSample, updateCurrentStatistics
-
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
- Returns:
- The current status of the Node.
-
getNodeStatusWithReason
- Returns:
- The reason why lead to current NodeStatus.
-