Class AbstractTrafficShapingHandler.SimpleObjectSizeEstimator
java.lang.Object
org.jboss.netty.util.DefaultObjectSizeEstimator
org.jboss.netty.handler.traffic.AbstractTrafficShapingHandler.SimpleObjectSizeEstimator
- All Implemented Interfaces:
ObjectSizeEstimator
- Enclosing class:
AbstractTrafficShapingHandler
public static class AbstractTrafficShapingHandler.SimpleObjectSizeEstimator
extends DefaultObjectSizeEstimator
For simple ChannelBuffer, returns the readableBytes, else
use standard DefaultObjectSizeEstimator.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the estimated size of the specified object in bytes.
-
Constructor Details
-
SimpleObjectSizeEstimator
public SimpleObjectSizeEstimator()
-
-
Method Details
-
estimateSize
Description copied from interface:ObjectSizeEstimatorReturns the estimated size of the specified object in bytes.- Specified by:
estimateSizein interfaceObjectSizeEstimator- Overrides:
estimateSizein classDefaultObjectSizeEstimator- Returns:
- a positive integer which represents the size of the specified object in bytes
-