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 class
private static final class
private static final class
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
PendingBytesTracker
(MessageSizeEstimator.Handle estimatorHandle) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
decrementPendingOutboundBytes
(long bytes) abstract void
incrementPendingOutboundBytes
(long bytes) (package private) static PendingBytesTracker
newTracker
(Channel channel) final int
Calculate the size of the given message.
-
Field Details
-
estimatorHandle
-
-
Constructor Details
-
PendingBytesTracker
-
-
Method Details
-
size
Description copied from interface:MessageSizeEstimator.Handle
Calculate the size of the given message.- Specified by:
size
in 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
-