Javadoc
To ensure that we can release any references and thus avoid a
blocking thread this method will attempt to merge references
in to the internal buffer. Compacting in this manner is done
only if the full reference can fit in to the available space.