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 protected
SynchronousFileIOChannel(FileIOChannel.ID channelID, boolean writeEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the channel.boolean
isClosed()
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:FileIOChannel
Checks whether the channel has been closed.- Specified by:
isClosed
in interfaceFileIOChannel
- Specified by:
isClosed
in classAbstractFileIOChannel
- Returns:
- True if the channel has been closed, false otherwise.
-
close
public void close() throws IOException
Description copied from interface:FileIOChannel
Closes 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:
close
in interfaceFileIOChannel
- Specified by:
close
in classAbstractFileIOChannel
- Throws:
IOException
- Thrown, if an error occurred while waiting for pending requests.
-
-