Class ConsensusGroupCache
java.lang.Object
org.apache.iotdb.confignode.manager.load.cache.AbstractLoadCache
org.apache.iotdb.confignode.manager.load.cache.consensus.ConsensusGroupCache
ConsensusGroupCache caches the ConsensusGroupHeartbeatSamples of a consensus group. Update and
cache the current statistics of the consensus group based on the latest
ConsensusGroupHeartbeatSample.
-
Field Summary
FieldsFields inherited from class org.apache.iotdb.confignode.manager.load.cache.AbstractLoadCache
currentStatistics, failureDetector, slidingWindow -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanvoidupdateCurrentStatistics(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.AbstractLoadCache
cacheHeartbeatSample, getLastSample
-
Field Details
-
UN_READY_LEADER_ID
public static final int UN_READY_LEADER_ID- See Also:
-
-
Constructor Details
-
ConsensusGroupCache
public ConsensusGroupCache()
-
-
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
-
getCurrentStatistics
- Overrides:
getCurrentStatisticsin classAbstractLoadCache
-
isLeaderUnSelected
public boolean isLeaderUnSelected() -
getLeaderId
public int getLeaderId()
-