Package org.jboss.netty.handler.traffic
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 TypeMethodDescriptionint
Returns the estimated size of the specified object in bytes.
-
Constructor Details
-
SimpleObjectSizeEstimator
public SimpleObjectSizeEstimator()
-
-
Method Details
-
estimateSize
Description copied from interface:ObjectSizeEstimator
Returns the estimated size of the specified object in bytes.- Specified by:
estimateSize
in interfaceObjectSizeEstimator
- Overrides:
estimateSize
in classDefaultObjectSizeEstimator
- Returns:
- a positive integer which represents the size of the specified object in bytes
-