Class SynchronousFileIOChannel
- java.lang.Object
-
- org.apache.flink.runtime.io.disk.iomanager.AbstractFileIOChannel
-
- org.apache.flink.runtime.io.disk.iomanager.SynchronousFileIOChannel
-
- All Implemented Interfaces:
FileIOChannel
- Direct Known Subclasses:
SynchronousBufferFileReader
public abstract class SynchronousFileIOChannel extends AbstractFileIOChannel
A base class for synchronous readers and writers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.io.disk.iomanager.FileIOChannel
FileIOChannel.Enumerator, FileIOChannel.ID
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.io.disk.iomanager.AbstractFileIOChannel
fileChannel, id, LOG
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSynchronousFileIOChannel(FileIOChannel.ID channelID, boolean writeEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the channel.booleanisClosed()Checks whether the channel has been closed.-
Methods inherited from class org.apache.flink.runtime.io.disk.iomanager.AbstractFileIOChannel
closeAndDelete, deleteChannel, getChannelID, getNioFileChannel, getSize
-
-
-
-
Constructor Detail
-
SynchronousFileIOChannel
protected SynchronousFileIOChannel(FileIOChannel.ID channelID, boolean writeEnabled) throws IOException
- Throws:
IOException
-
-
Method Detail
-
isClosed
public boolean isClosed()
Description copied from interface:FileIOChannelChecks whether the channel has been closed.- Specified by:
isClosedin interfaceFileIOChannel- Specified by:
isClosedin classAbstractFileIOChannel- Returns:
- True if the channel has been closed, false otherwise.
-
close
public void close() throws IOExceptionDescription copied from interface:FileIOChannelCloses the channel. For asynchronous implementations, this method waits until all pending requests are handled. Even if an exception interrupts the closing, the underlying FileChannel is closed.- Specified by:
closein interfaceFileIOChannel- Specified by:
closein classAbstractFileIOChannel- Throws:
IOException- Thrown, if an error occurred while waiting for pending requests.
-
-