-
- All Known Implementing Classes:
MaxMessagesWriteHandleFactory.MaxMessagesWriteHandle
- Enclosing interface:
- WriteHandleFactory
public static interface WriteHandleFactory.WriteHandleHandle which allows to customize how data / messages are read.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default longestimatedMaxBytesPerGatheringWrite()Estimate the maximum number of bytes that can be written with one gathering write operation.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.
-
-
-
Method Detail
-
estimatedMaxBytesPerGatheringWrite
default long estimatedMaxBytesPerGatheringWrite()
Estimate the maximum number of bytes that can be written with one gathering write operation.
-
lastWrite
boolean lastWrite(long attemptedBytesWrite, long actualBytesWrite, int numMessagesWrite)Notify theWriteHandleFactory.WriteHandleof the last write operation and its result.- 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
void writeComplete()
Method that must be called once the write loop was completed.
-
-