Package io.netty.channel
Class DefaultMessageSizeEstimator
- java.lang.Object
-
- io.netty.channel.DefaultMessageSizeEstimator
-
- All Implemented Interfaces:
MessageSizeEstimator
public final class DefaultMessageSizeEstimator extends java.lang.Object implements MessageSizeEstimator
DefaultMessageSizeEstimator
implementation which supports the estimation of the size ofByteBuf
,ByteBufHolder
andFileRegion
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.MessageSizeEstimator
MessageSizeEstimator.Handle
-
-
Field Summary
Fields Modifier and Type Field Description static MessageSizeEstimator
DEFAULT
Return the default implementation which returns8
for unknown messages.
-
Constructor Summary
Constructors Constructor Description DefaultMessageSizeEstimator(int unknownSize)
Create a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageSizeEstimator.Handle
newHandle()
Creates a new handle.
-
-
-
Field Detail
-
DEFAULT
public static final MessageSizeEstimator DEFAULT
Return the default implementation which returns8
for unknown messages.
-
-
Method Detail
-
newHandle
public MessageSizeEstimator.Handle newHandle()
Description copied from interface:MessageSizeEstimator
Creates a new handle. The handle provides the actual operations.- Specified by:
newHandle
in interfaceMessageSizeEstimator
-
-