code: public ChannelFlushPromiseNotifier notifyPromises(Throwable cause) {
          notifyPromises();
          for (;;) {
              FlushCheckpoint cp = flushCheckpoints.poll();
              if (cp == null) {
                  break;
              }
              if (tryNotify) {
                  cp.promise().tryFailure(cause);
              } else {
                  cp.promise().setFailure(cause);
              }
          }
          return this;
      }
docs: Notify all {@link ChannelFuture}s that were registered with {@link #add(ChannelPromise, int)} and
  their pendingDatasize isis smaller then the current writeCounter returned by {@link #writeCounter()}.
  
  After a {@link ChannelFuture} was notified it will be removed from this {@link ChannelFlushPromiseNotifier} and
  so not receive anymore notification.
  
  The rest of the remaining {@link ChannelFuture}s will be failed with the given {@link Throwable}.
  
  So after this operation this {@link ChannelFutureListener} is empty.