Module io.netty5.transport
Package io.netty5.channel
Class MaxMessagesWriteHandleFactory.MaxMessagesWriteHandle
- java.lang.Object
-
- io.netty5.channel.MaxMessagesWriteHandleFactory.MaxMessagesWriteHandle
-
- All Implemented Interfaces:
WriteHandleFactory.WriteHandle
- Enclosing class:
- MaxMessagesWriteHandleFactory
protected static class MaxMessagesWriteHandleFactory.MaxMessagesWriteHandle extends Object implements WriteHandleFactory.WriteHandle
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMaxMessagesWriteHandle(int maxMessagesPerWrite)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanlastWrite(long attemptedBytesWrite, long actualBytesWrite, int numMessagesWrite)Notify theWriteHandleFactory.WriteHandleof the last write operation and its result.voidwriteComplete()Method that must be called once the write loop was completed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty5.channel.WriteHandleFactory.WriteHandle
estimatedMaxBytesPerGatheringWrite
-
-
-
-
Method Detail
-
lastWrite
public boolean lastWrite(long attemptedBytesWrite, long actualBytesWrite, int numMessagesWrite)Description copied from interface:WriteHandleFactory.WriteHandleNotify theWriteHandleFactory.WriteHandleof the last write operation and its result.- Specified by:
lastWritein interfaceWriteHandleFactory.WriteHandle- Parameters:
attemptedBytesWrite- The number of bytes the write operation did attempt to write.actualBytesWrite- The number of bytes from the previous write operation. This may be negative if a write error occurs.numMessagesWrite- The number of messages written.- Returns:
trueif the write loop should continue writing,falseotherwise.
-
writeComplete
public void writeComplete()
Description copied from interface:WriteHandleFactory.WriteHandleMethod that must be called once the write loop was completed.- Specified by:
writeCompletein interfaceWriteHandleFactory.WriteHandle
-
-