public final class DefaultMessageSizeEstimator extends 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
-1 for unknown messages. |
Constructor and Description |
---|
DefaultMessageSizeEstimator(int unknownSize)
Create a new instance
|
public static final MessageSizeEstimator DEFAULT
-1
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–2015 The Netty Project. All rights reserved.