public interface BlockChannelWriter<T> extends BlockChannelWriterWithCallback<T>
MemorySegment
, which it writes entirely to the
channel, regardless of how space in the segment is used. The writing may be realized
synchronously, or asynchronously, depending on the implementation.FileIOChannel.Enumerator, FileIOChannel.ID
Modifier and Type | Method and Description |
---|---|
T |
getNextReturnedBlock()
Gets the next memory segment that has been written and is available again.
|
LinkedBlockingQueue<T> |
getReturnQueue()
Gets the queue in which the memory segments are queued after the asynchronous write is
completed
|
writeBlock
close, closeAndDelete, deleteChannel, getChannelID, getNioFileChannel, getSize, isClosed
T getNextReturnedBlock() throws IOException
NOTE: If this method is invoked without any segment ever returning (for example, because
the BlockChannelWriterWithCallback.writeBlock(T)
method has not been invoked accordingly), the method may block
forever.
IOException
- Thrown, if an I/O error occurs in the writer while waiting for the
request to return.LinkedBlockingQueue<T> getReturnQueue()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.