private void flushImpl(final long ts) {
    synchronized (myFlushLock) {
      if (myPendingFlush || myBuffer.isEmpty()) return;
      myPendingFlush = true;
      invokeConsumer(createConsumerRunnable(ts));
    }
  }
private void flushImpl(final long ts)