Package io.netty.channel
Class PendingBytesTracker
java.lang.Object
io.netty.channel.PendingBytesTracker
- All Implemented Interfaces:
MessageSizeEstimator.Handle
- Direct Known Subclasses:
PendingBytesTracker.ChannelOutboundBufferPendingBytesTracker,PendingBytesTracker.DefaultChannelPipelinePendingBytesTracker,PendingBytesTracker.NoopPendingBytesTracker
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static final classprivate static final class -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePendingBytesTracker(MessageSizeEstimator.Handle estimatorHandle) -
Method Summary
Modifier and TypeMethodDescriptionabstract voiddecrementPendingOutboundBytes(long bytes) abstract voidincrementPendingOutboundBytes(long bytes) (package private) static PendingBytesTrackernewTracker(Channel channel) final intCalculate the size of the given message.
-
Field Details
-
estimatorHandle
-
-
Constructor Details
-
PendingBytesTracker
-
-
Method Details
-
size
Description copied from interface:MessageSizeEstimator.HandleCalculate the size of the given message.- Specified by:
sizein interfaceMessageSizeEstimator.Handle- Parameters:
msg- The message for which the size should be calculated- Returns:
- size The size in bytes. The returned size must be >= 0
-
incrementPendingOutboundBytes
public abstract void incrementPendingOutboundBytes(long bytes) -
decrementPendingOutboundBytes
public abstract void decrementPendingOutboundBytes(long bytes) -
newTracker
-