Class SimpleCloseableInputProvider<E>
- java.lang.Object
-
- org.apache.flink.runtime.operators.util.SimpleCloseableInputProvider<E>
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,CloseableInputProvider<E>
public class SimpleCloseableInputProvider<E> extends Object implements CloseableInputProvider<E>
A simple iterator provider that returns a supplied iterator and does nothing when closed.
-
-
Constructor Summary
Constructors Constructor Description SimpleCloseableInputProvider(MutableObjectIterator<E> iterator)
Creates a new simple input provider that will return the given iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
MutableObjectIterator<E>
getIterator()
Gets the iterator over this input.
-
-
-
Constructor Detail
-
SimpleCloseableInputProvider
public SimpleCloseableInputProvider(MutableObjectIterator<E> iterator)
Creates a new simple input provider that will return the given iterator.- Parameters:
iterator
- The iterator that will be returned.
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getIterator
public MutableObjectIterator<E> getIterator()
Description copied from interface:CloseableInputProvider
Gets the iterator over this input.- Specified by:
getIterator
in interfaceCloseableInputProvider<E>
- Returns:
- The iterator provided by this iterator provider.
-
-