Class AsynchronousBlockWriterWithCallback

    • Constructor Detail

      • AsynchronousBlockWriterWithCallback

        protected AsynchronousBlockWriterWithCallback​(FileIOChannel.ID channelID,
                                                      RequestQueue<org.apache.flink.runtime.io.disk.iomanager.WriteRequest> requestQueue,
                                                      RequestDoneCallback<org.apache.flink.core.memory.MemorySegment> callback)
                                               throws IOException
        Creates a new asynchronous block writer for the given channel.
        Parameters:
        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.
        Throws:
        IOException - Thrown, if the underlying file channel could not be opened exclusively.
    • Method Detail

      • writeBlock

        public void writeBlock​(org.apache.flink.core.memory.MemorySegment segment)
                        throws IOException
        Issues a asynchronous write request to the writer.
        Specified by:
        writeBlock in interface BlockChannelWriterWithCallback<org.apache.flink.core.memory.MemorySegment>
        Parameters:
        segment - The segment to be written.
        Throws:
        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.