@Override
    public void evictWhile(final Supplier<Boolean> predicate, final Consumer<Eviction<K, V>> callback) {
        KeyValue<Bytes, byte[]> keyValue;

        if (predicate.get()) {
            long start = 0;
            if (minValid) {
                start = minTimestamp();
            }
            try (final KeyValueIterator<Bytes, byte[]> iterator = store
                .fetchAll(start, observedStreamTime() - gracePeriod)) {
                while (iterator.hasNext() && predicate.get()) {
                    keyValue = iterator.next();

                    final BufferValue bufferValue = BufferValue.deserialize(ByteBuffer.wrap(keyValue.value));
                    final K key = keySerde.deserializer().deserialize(topic,
                        PrefixedWindowKeySchemas.TimeFirstWindowKeySchema.extractStoreKeyBytes(keyValue.key.get()));

                    if (bufferValue.context().timestamp() < minTimestamp && minValid) {
                        throw new IllegalStateException(
                            "minTimestamp [" + minTimestamp + "] did not match the actual min timestamp [" +
                                bufferValue.context().timestamp() + "]"
                        );
                    }
                    minTimestamp = bufferValue.context().timestamp();
                    minValid = true;

                    final V value = valueSerde.deserializer().deserialize(topic, bufferValue.newValue());

                    callback.accept(new Eviction<>(key, value, bufferValue.context()));

                    store.remove(keyValue.key);

                    if (loggingEnabled) {
                        logTombstone(keyValue.key);
                    }

                    numRecords--;
                    bufferSize = bufferSize - computeRecordSize(keyValue.key, bufferValue);
                }
                if (numRecords == 0) {
                    minTimestamp = Long.MAX_VALUE;
                } else {
                    minTimestamp = observedStreamTime() - gracePeriod + 1;
                }
            }
        }
    }
As of 2.1, there's no way for users to directly interact with the buffer,
so this method is implemented solely to be called by Streams (which
it will do based on the {@code cache.max.bytes.buffering} config.
<p>
It's currently a no-op.
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTimeOrderedKeyValueBuffer.java