@Override
    public synchronized K peekNextKey() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        return next.key;
    }
Optimized {@link KeyValueIterator} used when the same element could be peeked multiple times.
streams/src/main/java/org/apache/kafka/streams/state/internals/DelegatingPeekingKeyValueIterator.java