Class DelegatingPeekingKeyValueIterator<K,V>
- java.lang.Object
-
- org.apache.kafka.streams.state.internals.DelegatingPeekingKeyValueIterator<K,V>
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.util.Iterator<KeyValue<K,V>>,PeekingKeyValueIterator<K,V>,KeyValueIterator<K,V>
public class DelegatingPeekingKeyValueIterator<K,V> extends java.lang.Object implements KeyValueIterator<K,V>, PeekingKeyValueIterator<K,V>
OptimizedKeyValueIteratorused when the same element could be peeked multiple times.
-
-
Constructor Summary
Constructors Constructor Description DelegatingPeekingKeyValueIterator(java.lang.String storeName, KeyValueIterator<K,V> underlying)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhasNext()KeyValue<K,V>next()KeyValue<K,V>peekNext()KpeekNextKey()Peek at the next key without advancing the iterator
-
-
-
Constructor Detail
-
DelegatingPeekingKeyValueIterator
public DelegatingPeekingKeyValueIterator(java.lang.String storeName, KeyValueIterator<K,V> underlying)
-
-
Method Detail
-
peekNextKey
public K peekNextKey()
Description copied from interface:KeyValueIteratorPeek at the next key without advancing the iterator- Specified by:
peekNextKeyin interfaceKeyValueIterator<K,V>- Returns:
- the key of the next value that would be returned from the next call to next
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceKeyValueIterator<K,V>
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<K>
-
-