Package io.netty.channel
Class DefaultMessageSizeEstimator
java.lang.Object
io.netty.channel.DefaultMessageSizeEstimator
- All Implemented Interfaces:
MessageSizeEstimator
Default
MessageSizeEstimator
implementation which supports the estimation of the size of
ByteBuf
, ByteBufHolder
and FileRegion
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Nested classes/interfaces inherited from interface io.netty.channel.MessageSizeEstimator
MessageSizeEstimator.Handle
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MessageSizeEstimator
Return the default implementation which returns8
for unknown messages.private final MessageSizeEstimator.Handle
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT
Return the default implementation which returns8
for unknown messages. -
handle
-
-
Constructor Details
-
DefaultMessageSizeEstimator
public DefaultMessageSizeEstimator(int unknownSize) Create a new instance- Parameters:
unknownSize
- The size which is returned for unknown messages.
-
-
Method Details
-
newHandle
Description copied from interface:MessageSizeEstimator
Creates a new handle. The handle provides the actual operations.- Specified by:
newHandle
in interfaceMessageSizeEstimator
-