public class AsynchronousBlockWriterWithCallback extends AsynchronousFileIOChannel<org.apache.flink.core.memory.MemorySegment,org.apache.flink.runtime.io.disk.iomanager.WriteRequest> implements BlockChannelWriterWithCallback<org.apache.flink.core.memory.MemorySegment>
BlockChannelWriterWithCallback that queues I/O
requests and calls a callback once they have been handled.FileIOChannel.Enumerator, FileIOChannel.IDclosed, closeLock, exception, requestQueue, requestsNotReturned, resultHandlerfileChannel, id, LOG| 限定符 | 构造器和说明 |
|---|---|
protected |
AsynchronousBlockWriterWithCallback(FileIOChannel.ID channelID,
RequestQueue<org.apache.flink.runtime.io.disk.iomanager.WriteRequest> requestQueue,
RequestDoneCallback<org.apache.flink.core.memory.MemorySegment> callback)
Creates a new asynchronous block writer for the given channel.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
writeBlock(org.apache.flink.core.memory.MemorySegment segment)
Issues a asynchronous write request to the writer.
|
addRequest, checkErroneous, close, closeAndDelete, handleProcessedBuffer, isClosed, registerAllRequestsProcessedListenerdeleteChannel, getChannelID, getNioFileChannel, getSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, closeAndDelete, deleteChannel, getChannelID, getNioFileChannel, getSize, isClosedprotected AsynchronousBlockWriterWithCallback(FileIOChannel.ID channelID, RequestQueue<org.apache.flink.runtime.io.disk.iomanager.WriteRequest> requestQueue, RequestDoneCallback<org.apache.flink.core.memory.MemorySegment> 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(org.apache.flink.core.memory.MemorySegment segment)
throws IOException
writeBlock 在接口中 BlockChannelWriterWithCallback<org.apache.flink.core.memory.MemorySegment>segment - 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 © 2014–2023 The Apache Software Foundation. All rights reserved.