Package org.apache.flink.runtime.io.disk
Class ChannelReaderInputViewIterator<E>
- java.lang.Object
-
- org.apache.flink.runtime.io.disk.ChannelReaderInputViewIterator<E>
-
- All Implemented Interfaces:
MutableObjectIterator<E>
public class ChannelReaderInputViewIterator<E> extends Object implements MutableObjectIterator<E>
A simple iterator over the input read though an I/O channel.
-
-
Constructor Summary
Constructors Constructor Description ChannelReaderInputViewIterator(AbstractChannelReaderInputView inView, List<MemorySegment> freeMemTarget, TypeSerializer<E> accessors)
ChannelReaderInputViewIterator(BlockChannelReader<MemorySegment> reader, LinkedBlockingQueue<MemorySegment> returnQueue, List<MemorySegment> segments, List<MemorySegment> freeMemTarget, TypeSerializer<E> accessors, int numBlocks)
ChannelReaderInputViewIterator(IOManager ioAccess, FileIOChannel.ID channel, LinkedBlockingQueue<MemorySegment> returnQueue, List<MemorySegment> segments, List<MemorySegment> freeMemTarget, TypeSerializer<E> accessors, int numBlocks)
ChannelReaderInputViewIterator(IOManager ioAccess, FileIOChannel.ID channel, List<MemorySegment> segments, List<MemorySegment> freeMemTarget, TypeSerializer<E> accessors, int numBlocks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
next()
Gets the next element from the collection.E
next(E reuse)
Gets the next element from the collection.
-
-
-
Constructor Detail
-
ChannelReaderInputViewIterator
public ChannelReaderInputViewIterator(IOManager ioAccess, FileIOChannel.ID channel, List<MemorySegment> segments, List<MemorySegment> freeMemTarget, TypeSerializer<E> accessors, int numBlocks) throws IOException
- Throws:
IOException
-
ChannelReaderInputViewIterator
public ChannelReaderInputViewIterator(IOManager ioAccess, FileIOChannel.ID channel, LinkedBlockingQueue<MemorySegment> returnQueue, List<MemorySegment> segments, List<MemorySegment> freeMemTarget, TypeSerializer<E> accessors, int numBlocks) throws IOException
- Throws:
IOException
-
ChannelReaderInputViewIterator
public ChannelReaderInputViewIterator(BlockChannelReader<MemorySegment> reader, LinkedBlockingQueue<MemorySegment> returnQueue, List<MemorySegment> segments, List<MemorySegment> freeMemTarget, TypeSerializer<E> accessors, int numBlocks) throws IOException
- Throws:
IOException
-
ChannelReaderInputViewIterator
public ChannelReaderInputViewIterator(AbstractChannelReaderInputView inView, List<MemorySegment> freeMemTarget, TypeSerializer<E> accessors)
-
-
Method Detail
-
next
public E next(E reuse) throws IOException
Description copied from interface:MutableObjectIterator
Gets the next element from the collection. The contents of that next element is put into the given reuse object, if the type is mutable.- Specified by:
next
in interfaceMutableObjectIterator<E>
- Parameters:
reuse
- The target object into which to place next element if E is mutable.- Returns:
- The filled object or
null
if the iterator is exhausted. - Throws:
IOException
- Thrown, if a problem occurred in the underlying I/O layer or in the serialization / deserialization logic
-
next
public E next() throws IOException
Description copied from interface:MutableObjectIterator
Gets the next element from the collection. The iterator implementation must obtain a new instance.- Specified by:
next
in interfaceMutableObjectIterator<E>
- Returns:
- The object or
null
if the iterator is exhausted. - Throws:
IOException
- Thrown, if a problem occurred in the underlying I/O layer or in the serialization / deserialization logic
-
-