docs: private void flushSinkAtInterval() {
      Object flushIntervalObj = sinkConfig.get(MetricsSinksConfig.CONFIG_KEY_FLUSH_FREQUENCY_MS);
  
      // If the config is not set, we consider the flush() would never be invoked
      if (flushIntervalObj != null) {
        final Duration flushInterval = TypeUtils.getDuration(flushIntervalObj, ChronoUnit.MILLIS);
  
        Runnable flushSink = new Runnable() {
          @Override
          public void run() {
            metricsSink.flush();
            //Plan itself in future
            slaveLooper.registerTimerEvent(flushInterval, this);
          }
        };
  
        // Plan the runnable explicitly at the first time
        slaveLooper.registerTimerEvent(flushInterval, flushSink);
      }
    }