public class AsynchronousBufferFileWriter extends AsynchronousFileIOChannel<Buffer,org.apache.flink.runtime.io.disk.iomanager.WriteRequest> implements BufferFileWriter
FileIOChannel.Enumerator, FileIOChannel.IDclosed, closeLock, exception, requestQueue, requestsNotReturned, resultHandlerfileChannel, id, LOG| 限定符 | 构造器和说明 |
|---|---|
protected |
AsynchronousBufferFileWriter(FileIOChannel.ID channelID,
RequestQueue<org.apache.flink.runtime.io.disk.iomanager.WriteRequest> requestQueue) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getNumberOfOutstandingRequests()
Returns the number of outstanding requests.
|
boolean |
registerAllRequestsProcessedListener(NotificationListener listener)
Registers a listener to be notified when all outstanding requests have been processed.
|
void |
writeBlock(Buffer buffer)
Writes the given block asynchronously.
|
addRequest, checkErroneous, close, closeAndDelete, handleProcessedBuffer, isCloseddeleteChannel, getChannelID, getNioFileChannel, getSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, closeAndDelete, deleteChannel, getChannelID, getNioFileChannel, getSize, isClosedprotected AsynchronousBufferFileWriter(FileIOChannel.ID channelID, RequestQueue<org.apache.flink.runtime.io.disk.iomanager.WriteRequest> requestQueue) throws IOException
IOExceptionpublic void writeBlock(Buffer buffer) throws IOException
writeBlock 在接口中 BlockChannelWriterWithCallback<Buffer>buffer - the buffer to be written (will be recycled when done)IOException - thrown if adding the write operation failspublic int getNumberOfOutstandingRequests()
BufferFileWriterpublic boolean registerAllRequestsProcessedListener(NotificationListener listener) throws IOException
AsynchronousFileIOChannelNew requests can arrive right after the listener got notified. Therefore, it is not safe to assume that the number of outstanding requests is still zero after a notification unless there was a close right before the listener got called.
Returns true, if the registration was successful. A registration can fail, if
there are no outstanding requests when trying to register a listener.
registerAllRequestsProcessedListener 在接口中 BufferFileWriterregisterAllRequestsProcessedListener 在类中 AsynchronousFileIOChannel<Buffer,org.apache.flink.runtime.io.disk.iomanager.WriteRequest>IOExceptionCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.