public class StreamToKeyValueIteratorAdapter<K,V> extends Object implements org.apache.kafka.streams.state.KeyValueIterator<K,V>, Consumer<org.apache.kafka.streams.KeyValue<K,V>>
Stream
<KeyValue
<K, V>> to
KeyValueIterator
<K, V> and lazily evaluates it when 1st queried.
It also contains a static method for converting it the other way.
toStream(KeyValueIterator)
Constructor and Description |
---|
StreamToKeyValueIteratorAdapter(Stream<org.apache.kafka.streams.KeyValue<K,V>> stream) |
Modifier and Type | Method and Description |
---|---|
void |
accept(org.apache.kafka.streams.KeyValue<K,V> kv) |
void |
close() |
boolean |
hasNext() |
org.apache.kafka.streams.KeyValue<K,V> |
next() |
K |
peekNextKey() |
static <K,V> Stream<org.apache.kafka.streams.KeyValue<K,V>> |
toStream(org.apache.kafka.streams.state.KeyValueIterator<K,V> kvIterator) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, remove
public boolean hasNext()
public K peekNextKey()
public void close()
public static <K,V> Stream<org.apache.kafka.streams.KeyValue<K,V>> toStream(org.apache.kafka.streams.state.KeyValueIterator<K,V> kvIterator)
Copyright © 2020 Red Hat. All rights reserved.