- java.lang.Object
-
- io.netty5.channel.DefaultMessageSizeEstimator
-
- All Implemented Interfaces:
MessageSizeEstimator
public final class DefaultMessageSizeEstimator extends Object implements MessageSizeEstimator
DefaultMessageSizeEstimator
implementation which supports the estimation of the size ofBuffer
andFileRegion
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty5.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
-
-
-
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
-
-