public AbstractHeartbeatSample getLastSample() {
    return slidingWindow.isEmpty() ? null : slidingWindow.get(slidingWindow.size() - 1);
  }
Get the latest heartbeat sample that cached in the slidingWindow.

@return The latest heartbeat sample.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/AbstractLoadCache.java