private void scheduleFlushBuffer() {
    ThreadingAssertions.assertEventDispatchThread();

    Runnable flushTask = () -> {
      ThreadingAssertions.assertEventDispatchThread();
      if (!flushScheduled) return;
      flushScheduled = false;
      buffer.flushBuffer(delegateListener);
    };

    if (!flushScheduled) {
      flushAlarm.addRequest(flushTask, myThrottlingDelay);
      flushScheduled = true;
    }
  }
private void scheduleFlushBuffer()