public class LimitWriteOperationsReuseBuffers extends LimitWriteOperations
LimitAsyncOperations.Executor<InputType,OutputResultType,OutputErrorType extends Exception>| Constructor and Description |
|---|
LimitWriteOperationsReuseBuffers(IO.Writable io,
int bufferSize,
int maxOperations)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
freeBuffer(ByteBuffer buffer)
Must be called only if the user has not been used for a write operation,
else it will be automatically free when write operation is done.
|
ByteBuffer |
getBuffer()
Return a buffer to put data to write.
|
protected void |
writeDone(ByteBuffer buffer,
AsyncSupplier<Integer,IOException> result) |
flush, getLastPendingOperation, writepublic LimitWriteOperationsReuseBuffers(IO.Writable io, int bufferSize, int maxOperations)
public ByteBuffer getBuffer()
public void freeBuffer(ByteBuffer buffer)
protected void writeDone(ByteBuffer buffer, AsyncSupplier<Integer,IOException> result)
writeDone in class LimitAsyncOperations<ByteBuffer,Integer,IOException>Copyright © 2019. All rights reserved.