/** * Makes sure the item cached by the head node in a bounded * ReplaySubject is released (as it is never part of a replay). * <p> * By default, live bounded buffers will remember one item before * the currently receivable one to ensure subscribers can always * receive a continuous sequence of items. A terminated ReplaySubject * automatically releases this inaccessible item. * <p> * The method must be called sequentially, similar to the standard * {@code onXXX} methods. * @since 2.1.11 - experimental */ @Experimental public void cleanupBuffer() { buffer.trimHead(); }
/** * Makes sure the item cached by the head node in a bounded * ReplaySubject is released (as it is never part of a replay). * <p> * By default, live bounded buffers will remember one item before * the currently receivable one to ensure subscribers can always * receive a continuous sequence of items. A terminated ReplaySubject * automatically releases this inaccessible item. * <p> * The method must be called sequentially, similar to the standard * {@code onXXX} methods. * <p>History: 2.1.11 - experimental * @since 2.2 */ public void cleanupBuffer() { buffer.trimHead(); }