public final class DefaultMessageSizeEstimator extends java.lang.Object implements MessageSizeEstimator
MessageSizeEstimator
implementation which supports the estimation of the size of
ByteBuf
, ByteBufHolder
and FileRegion
.MessageSizeEstimator.Handle
Modifier and Type | Field and Description |
---|---|
static MessageSizeEstimator |
DEFAULT
Return the default implementation which returns
8 for unknown messages. |
Constructor and Description |
---|
DefaultMessageSizeEstimator(int unknownSize)
Create a new instance
|
Modifier and Type | Method and Description |
---|---|
MessageSizeEstimator.Handle |
newHandle()
Creates a new handle.
|
public static final MessageSizeEstimator DEFAULT
8
for unknown messages.public DefaultMessageSizeEstimator(int unknownSize)
unknownSize
- The size which is returned for unknown messages.public MessageSizeEstimator.Handle newHandle()
MessageSizeEstimator
newHandle
in interface MessageSizeEstimator
Copyright © 2008–2018 The Netty Project. All rights reserved.