Class AdaptiveRecvByteBufAllocator.HandleImpl
java.lang.Object
io.netty.channel.DefaultMaxMessagesRecvByteBufAllocator.MaxMessageHandle
io.netty.channel.AdaptiveRecvByteBufAllocator.HandleImpl
- All Implemented Interfaces:
RecvByteBufAllocator.ExtendedHandle, RecvByteBufAllocator.Handle
- Enclosing class:
AdaptiveRecvByteBufAllocator
private final class AdaptiveRecvByteBufAllocator.HandleImpl
extends DefaultMaxMessagesRecvByteBufAllocator.MaxMessageHandle
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintguess()Similar toRecvByteBufAllocator.Handle.allocate(ByteBufAllocator)except that it does not allocate anything but just tells the capacity.voidlastBytesRead(int bytes) Set the bytes that have been read for the last read operation.voidThe read has completed.Methods inherited from class DefaultMaxMessagesRecvByteBufAllocator.MaxMessageHandle
allocate, attemptedBytesRead, attemptedBytesRead, continueReading, continueReading, incMessagesRead, lastBytesRead, reset, totalBytesRead
-
Field Details
-
calculator
-
-
Constructor Details
-
HandleImpl
HandleImpl(int minimum, int initial, int maximum)
-
-
Method Details
-
lastBytesRead
public void lastBytesRead(int bytes) Description copied from interface:RecvByteBufAllocator.HandleSet the bytes that have been read for the last read operation. This may be used to increment the number of bytes that have been read.- Specified by:
lastBytesReadin interfaceRecvByteBufAllocator.Handle- Overrides:
lastBytesReadin classDefaultMaxMessagesRecvByteBufAllocator.MaxMessageHandle- Parameters:
bytes- The number of bytes from the previous read operation. This may be negative if an read error occurs. If a negative value is seen it is expected to be return on the next call toRecvByteBufAllocator.Handle.lastBytesRead(). A negative value will signal a termination condition enforced externally to this class and is not required to be enforced inRecvByteBufAllocator.Handle.continueReading().
-
guess
public int guess()Description copied from interface:RecvByteBufAllocator.HandleSimilar toRecvByteBufAllocator.Handle.allocate(ByteBufAllocator)except that it does not allocate anything but just tells the capacity. -
readComplete
public void readComplete()Description copied from interface:RecvByteBufAllocator.HandleThe read has completed.- Specified by:
readCompletein interfaceRecvByteBufAllocator.Handle- Overrides:
readCompletein classDefaultMaxMessagesRecvByteBufAllocator.MaxMessageHandle
-