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| 限定符和类型 | 字段和说明 |
|---|---|
static MessageSizeEstimator |
DEFAULT
Return the default implementation which returns
8 for unknown messages. |
| 构造器和说明 |
|---|
DefaultMessageSizeEstimator(int unknownSize)
Create a new instance
|
| 限定符和类型 | 方法和说明 |
|---|---|
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()
MessageSizeEstimatornewHandle 在接口中 MessageSizeEstimator