Package org.apache.flink.state.api.input
Class MultiStateKeyIterator<K>
java.lang.Object
org.apache.flink.state.api.input.MultiStateKeyIterator<K>
- Type Parameters:
K- Type of the key by which state is keyed.
- All Implemented Interfaces:
AutoCloseable,Iterator<K>,org.apache.flink.util.CloseableIterator<K>
@Internal
public final class MultiStateKeyIterator<K>
extends Object
implements org.apache.flink.util.CloseableIterator<K>
An iterator for reading all keys in a state backend across multiple partitioned states.
To read unique keys across all partitioned states callers must invoke remove().
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.util.CloseableIterator
org.apache.flink.util.CloseableIterator.IteratorAdapter<E extends Object> -
Field Summary
Fields inherited from interface org.apache.flink.util.CloseableIterator
EMPTY_INSTANCE -
Constructor Summary
ConstructorsConstructorDescriptionMultiStateKeyIterator(List<? extends org.apache.flink.api.common.state.StateDescriptor<?, ?>> descriptors, org.apache.flink.runtime.state.KeyedStateBackend<K> backend) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
MultiStateKeyIterator
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove()Removes the current key from ALL known states in the state backend. -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-