Package org.apache.flink.runtime.io.disk
Class RandomAccessOutputView
- java.lang.Object
-
- org.apache.flink.runtime.memory.AbstractPagedOutputView
-
- org.apache.flink.runtime.io.disk.RandomAccessOutputView
-
- All Implemented Interfaces:
DataOutput
,DataOutputView
,MemorySegmentWritable
,SeekableDataOutputView
public class RandomAccessOutputView extends AbstractPagedOutputView implements SeekableDataOutputView
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.memory.AbstractPagedOutputView
headerLength, segmentSize
-
-
Constructor Summary
Constructors Constructor Description RandomAccessOutputView(MemorySegment[] segments, int segmentSize)
RandomAccessOutputView(MemorySegment[] segments, int segmentSize, int segmentSizeBits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MemorySegment
nextSegment(MemorySegment current, int positionInCurrent)
This method must return a segment.void
setWritePosition(long position)
Sets the write pointer to the given position.-
Methods inherited from class org.apache.flink.runtime.memory.AbstractPagedOutputView
advance, clear, getCurrentPositionInSegment, getCurrentSegment, getHeaderLength, getSegmentSize, seekOutput, skipBytesToWrite, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.io.DataOutput
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Methods inherited from interface org.apache.flink.core.memory.DataOutputView
skipBytesToWrite, write
-
-
-
-
Constructor Detail
-
RandomAccessOutputView
public RandomAccessOutputView(MemorySegment[] segments, int segmentSize)
-
RandomAccessOutputView
public RandomAccessOutputView(MemorySegment[] segments, int segmentSize, int segmentSizeBits)
-
-
Method Detail
-
nextSegment
protected MemorySegment nextSegment(MemorySegment current, int positionInCurrent) throws EOFException
Description copied from class:AbstractPagedOutputView
This method must return a segment. If no more segments are available, it must throw anEOFException
.- Specified by:
nextSegment
in classAbstractPagedOutputView
- Parameters:
current
- The current memory segmentpositionInCurrent
- The position in the segment, one after the last valid byte.- Returns:
- The next memory segment.
- Throws:
EOFException
-
setWritePosition
public void setWritePosition(long position)
Description copied from interface:SeekableDataOutputView
Sets the write pointer to the given position.- Specified by:
setWritePosition
in interfaceSeekableDataOutputView
- Parameters:
position
- The new write position.
-
-