Class ConfigNodeHeartbeatCache
java.lang.Object
org.apache.iotdb.confignode.manager.load.cache.AbstractLoadCache
org.apache.iotdb.confignode.manager.load.cache.node.BaseNodeCache
org.apache.iotdb.confignode.manager.load.cache.node.ConfigNodeHeartbeatCache
Heartbeat cache for cluster ConfigNodes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intOnly get CURRENT_NODE_ID here due to initialization order.static final NodeStatisticsFields inherited from class org.apache.iotdb.confignode.manager.load.cache.node.BaseNodeCache
nodeIdFields inherited from class org.apache.iotdb.confignode.manager.load.cache.AbstractLoadCache
currentStatistics, failureDetector, slidingWindow -
Constructor Summary
ConstructorsConstructorDescriptionConfigNodeHeartbeatCache(int configNodeId) Constructor for create ConfigNodeHeartbeatCache with default NodeStatistics.ConfigNodeHeartbeatCache(int configNodeId, NodeStatistics statistics) Constructor only for ConfigNode-leader. -
Method Summary
Modifier and TypeMethodDescriptionvoidupdateCurrentStatistics(boolean forceUpdate) Update currentStatistics based on the latest heartbeat sample that cached in the slidingWindow.Methods inherited from class org.apache.iotdb.confignode.manager.load.cache.node.BaseNodeCache
getLoadScore, getNodeId, getNodeStatus, getNodeStatusWithReasonMethods inherited from class org.apache.iotdb.confignode.manager.load.cache.AbstractLoadCache
cacheHeartbeatSample, getCurrentStatistics, getLastSample
-
Field Details
-
CURRENT_NODE_ID
public static final int CURRENT_NODE_IDOnly get CURRENT_NODE_ID here due to initialization order. -
CURRENT_NODE_STATISTICS
-
-
Constructor Details
-
ConfigNodeHeartbeatCache
public ConfigNodeHeartbeatCache(int configNodeId) Constructor for create ConfigNodeHeartbeatCache with default NodeStatistics. -
ConfigNodeHeartbeatCache
Constructor only for ConfigNode-leader.
-
-
Method Details
-
updateCurrentStatistics
public void updateCurrentStatistics(boolean forceUpdate) Description copied from class:AbstractLoadCacheUpdate currentStatistics based on the latest heartbeat sample that cached in the slidingWindow.- Specified by:
updateCurrentStatisticsin classAbstractLoadCache
-