code: public final ByteBuf removeFirst(ChannelPromise aggregatePromise) {
          Object entry = bufAndListenerPairs.poll();
          if (entry == null) {
              return null;
          }
          assert entry instanceof ByteBuf;
          ByteBuf result = (ByteBuf) entry;
  
          decrementReadableBytes(result.readableBytes());
  
          entry = bufAndListenerPairs.peek();
          if (entry instanceof ChannelFutureListener) {
              aggregatePromise.addListener((ChannelFutureListener) entry);
              bufAndListenerPairs.poll();
          }
          return result;
      }
docs: Remove the first {@link ByteBuf} from the queue.
  @param aggregatePromise used to aggregate the promises and listeners for the returned buffer.
  @return the first {@link ByteBuf} from the queue.