Package org.jboss.netty.channel
Class AdaptiveReceiveBufferSizePredictorFactory
java.lang.Object
org.jboss.netty.channel.AdaptiveReceiveBufferSizePredictorFactory
- All Implemented Interfaces:
ReceiveBufferSizePredictorFactory
public class AdaptiveReceiveBufferSizePredictorFactory
extends Object
implements ReceiveBufferSizePredictorFactory
The
ReceiveBufferSizePredictorFactory
that creates a new
AdaptiveReceiveBufferSizePredictor
.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new factory with the default parameters.AdaptiveReceiveBufferSizePredictorFactory
(int minimum, int initial, int maximum) Creates a new factory with the specified parameters. -
Method Summary
-
Field Details
-
minimum
private final int minimum -
initial
private final int initial -
maximum
private final int maximum
-
-
Constructor Details
-
AdaptiveReceiveBufferSizePredictorFactory
public AdaptiveReceiveBufferSizePredictorFactory()Creates a new factory with the default parameters. With the default parameters, the expected buffer size starts from1024
, does not go down below64
, and does not go up above65536
. -
AdaptiveReceiveBufferSizePredictorFactory
public AdaptiveReceiveBufferSizePredictorFactory(int minimum, int initial, int maximum) Creates a new factory with the specified parameters.- Parameters:
minimum
- the inclusive lower bound of the expected buffer sizeinitial
- the initial buffer size when no feed back was receivedmaximum
- the inclusive upper bound of the expected buffer size
-
-
Method Details
-
getPredictor
Description copied from interface:ReceiveBufferSizePredictorFactory
Returns a newly createdReceiveBufferSizePredictor
.- Specified by:
getPredictor
in interfaceReceiveBufferSizePredictorFactory
- Throws:
Exception
-