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>
OptimizedKeyValueIterator
used 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 void
close()
boolean
hasNext()
KeyValue<K,V>
next()
KeyValue<K,V>
peekNext()
K
peekNextKey()
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:KeyValueIterator
Peek at the next key without advancing the iterator- Specified by:
peekNextKey
in 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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceKeyValueIterator<K,V>
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<K>
-
-