int addAndRemoveIfRequested(Object o) {
            requireNonNull(o);
            int removedLength = 0;
            if (headOffset < lastRemovalRequestedOffset) {
                removedLength = removeElements();
            }
            final int t = tail;
            final Object[] elements = this.elements;
            assert elements != null : "elements is null. SignalQueue: " + this;

            elements[t] = o;
            size++;
            if ((tail = t + 1 & elements.length - 1) == head) {
                doubleCapacity();
            }
            return removedLength;
        }
Invoked by the executor in {@link StreamMessageProcessor}.
core/src/main/java/com/linecorp/armeria/common/stream/DefaultStreamMessageDuplicator.java