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 intsize(java.lang.Object msg) Calculate the size of the given message.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
estimatorHandle
-
-
Constructor Details
-
PendingBytesTracker
-
-
Method Details
-
size
public final int size(java.lang.Object msg) 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
-