public class AsynchronousBlockWriterWithCallback extends AsynchronousFileIOChannel<org.apache.flink.runtime.io.disk.iomanager.WriteRequest> implements BlockChannelWriterWithCallback
BlockChannelWriterWithCallback that queues I/O requests
and calls a callback once they have been handled.FileIOChannel.Enumerator, FileIOChannel.IDclosed, closeLock, exception, requestQueue, requestsNotReturned, resultHanderfileChannel, id, LOG| Modifier | Constructor and Description |
|---|---|
protected |
AsynchronousBlockWriterWithCallback(FileIOChannel.ID channelID,
RequestQueue<org.apache.flink.runtime.io.disk.iomanager.WriteRequest> requestQueue,
RequestDoneCallback callback)
Creates a new asynchronous block writer for the given channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
writeBlock(MemorySegment segment)
Issues a asynchronous write request to the writer.
|
checkErroneous, close, closeAndDelete, isCloseddeleteChannel, getChannelIDclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, closeAndDelete, deleteChannel, getChannelID, isClosedprotected AsynchronousBlockWriterWithCallback(FileIOChannel.ID channelID, RequestQueue<org.apache.flink.runtime.io.disk.iomanager.WriteRequest> requestQueue, RequestDoneCallback callback) throws IOException
channelID - The ID of the channel to write to.requestQueue - The request queue of the asynchronous writer thread, to which the I/O requests are added.callback - The callback to be invoked when requests are done.IOException - Thrown, if the underlying file channel could not be opened exclusively.public void writeBlock(MemorySegment segment) throws IOException
writeBlock in interface BlockChannelWriterWithCallbacksegment - The segment to be written.IOException - Thrown, when the writer encounters an I/O error. Due to the asynchronous nature of the
writer, the exception thrown here may have been caused by an earlier write request.Copyright © 2015 The Apache Software Foundation. All rights reserved.