Class AbstractLoadCache

java.lang.Object
org.apache.iotdb.confignode.manager.load.cache.AbstractLoadCache
Direct Known Subclasses:
BaseNodeCache, ConsensusGroupCache, RegionCache

public abstract class AbstractLoadCache extends Object
AbstractLoadCache caches the recent MAXIMUM_WINDOW_SIZE heartbeat samples and calculates the current statistics based on the latest heartbeat mple.
  • Field Details

  • Constructor Details

    • AbstractLoadCache

      protected AbstractLoadCache()
  • Method Details

    • cacheHeartbeatSample

      public void cacheHeartbeatSample(AbstractHeartbeatSample newHeartbeatSample)
      Cache the latest heartbeat sample.
      Parameters:
      newHeartbeatSample - The latest heartbeat sample.
    • getLastSample

      public AbstractHeartbeatSample getLastSample()
      Get the latest heartbeat sample that cached in the slidingWindow.
      Returns:
      The latest heartbeat sample.
    • updateCurrentStatistics

      public abstract void updateCurrentStatistics(boolean forceUpdate)
      Update currentStatistics based on the latest heartbeat sample that cached in the slidingWindow.
    • getCurrentStatistics

      public AbstractStatistics getCurrentStatistics()