@Override
  public synchronized void updateCurrentStatistics(boolean forceUpdate) {
    RegionHeartbeatSample lastSample;
    List<AbstractHeartbeatSample> history;
    synchronized (slidingWindow) {
      lastSample = (RegionHeartbeatSample) getLastSample();
      history = Collections.unmodifiableList(slidingWindow);

      RegionStatus status;
      long currentNanoTime = System.nanoTime();
      if (lastSample == null) {
        /* First heartbeat not received from this region, status is UNKNOWN */
        status = RegionStatus.Unknown;
      } else if (!failureDetector.isAvailable(id, history)) {
        /* Failure detector decides that this region is UNKNOWN */
        status = RegionStatus.Unknown;
      } else {
        status = lastSample.getStatus();
      }
      this.currentStatistics.set(new RegionStatistics(currentNanoTime, status));
    }
  }
RegionCache caches the RegionHeartbeatSamples of a Region. Update and cache the current
statistics of the Region based on the latest RegionHeartbeatSample.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/region/RegionCache.java