Class RegionGroupCache
java.lang.Object
org.apache.iotdb.confignode.manager.load.cache.region.RegionGroupCache
RegionGroupCache caches the RegionHeartbeatSamples of all Regions in the same RegionGroup. Update
and cache the current statistics of the RegionGroup based on the latest RegionHeartbeatSamples
from all Regions it contains.
-
Constructor Summary
ConstructorsConstructorDescriptionRegionGroupCache(String database, Set<Integer> dataNodeIds, boolean isStrongConsistency) Constructor for create RegionGroupCache with default RegionGroupStatistics. -
Method Summary
Modifier and TypeMethodDescriptionvoidcacheHeartbeatSample(int dataNodeId, RegionHeartbeatSample newHeartbeatSample) voidcacheHeartbeatSample(int dataNodeId, RegionHeartbeatSample newHeartbeatSample, boolean overwrite) Cache the newest RegionHeartbeatSample.voidcreateRegionCache(int dataNodeId) Create the cache of the specified Region.getRegionCache(int nodeId) voidremoveRegionCache(int dataNodeId) Remove the cache of the specified Region in the specified RegionGroup.voidUpdate currentStatistics based on the latest NodeHeartbeatSamples that cached in the slidingWindow.
-
Constructor Details
-
RegionGroupCache
Constructor for create RegionGroupCache with default RegionGroupStatistics.
-
-
Method Details
-
cacheHeartbeatSample
public void cacheHeartbeatSample(int dataNodeId, RegionHeartbeatSample newHeartbeatSample, boolean overwrite) Cache the newest RegionHeartbeatSample.- Parameters:
dataNodeId- Where the specified Region residesnewHeartbeatSample- The newest RegionHeartbeatSampleoverwrite- Able to overwrite Adding or Removing
-
cacheHeartbeatSample
-
createRegionCache
public void createRegionCache(int dataNodeId) Create the cache of the specified Region.- Parameters:
dataNodeId- the specified DataNode
-
removeRegionCache
public void removeRegionCache(int dataNodeId) Remove the cache of the specified Region in the specified RegionGroup.- Parameters:
dataNodeId- the specified DataNode
-
updateCurrentStatistics
public void updateCurrentStatistics()Update currentStatistics based on the latest NodeHeartbeatSamples that cached in the slidingWindow. -
getCurrentStatistics
-
getDatabase
-
getRegionLocations
-
getRegionCache
-