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 Constructor Description SimpleObjectSizeEstimator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intestimateSize(java.lang.Object o)Returns the estimated size of the specified object in bytes.
-
-
-
Method Detail
-
estimateSize
public int estimateSize(java.lang.Object o)
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
-
-