Java 类org.jboss.netty.channel.ReceiveBufferSizePredictorFactory 实例源码

项目:android-netty    文件:DefaultNioSocketChannelConfig.java   
@Override
public boolean setOption(String key, Object value) {
    if (super.setOption(key, value)) {
        return true;
    }

    if ("writeBufferHighWaterMark".equals(key)) {
        setWriteBufferHighWaterMark0(ConversionUtil.toInt(value));
    } else if ("writeBufferLowWaterMark".equals(key)) {
        setWriteBufferLowWaterMark0(ConversionUtil.toInt(value));
    } else if ("writeSpinCount".equals(key)) {
        setWriteSpinCount(ConversionUtil.toInt(value));
    } else if ("receiveBufferSizePredictorFactory".equals(key)) {
        setReceiveBufferSizePredictorFactory((ReceiveBufferSizePredictorFactory) value);
    } else if ("receiveBufferSizePredictor".equals(key)) {
        setReceiveBufferSizePredictor((ReceiveBufferSizePredictor) value);
    } else {
        return false;
    }
    return true;
}
项目:android-netty    文件:DefaultNioSocketChannelConfig.java   
public ReceiveBufferSizePredictorFactory getReceiveBufferSizePredictorFactory() {
    return predictorFactory;
}
项目:android-netty    文件:DefaultNioSocketChannelConfig.java   
public void setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory) {
    if (predictorFactory == null) {
        throw new NullPointerException("predictorFactory");
    }
    this.predictorFactory = predictorFactory;
}
项目:android-netty    文件:NioSocketChannelConfig.java   
/**
 * Returns the {@link ReceiveBufferSizePredictorFactory} which creates a new
 * {@link ReceiveBufferSizePredictor} when a new channel is created and
 * no {@link ReceiveBufferSizePredictor} was set.  If no predictor was set
 * for the channel, {@link #setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)}
 * will be called with the new predictor.  The default factory is
 * <tt>{@link AdaptiveReceiveBufferSizePredictorFactory}(64, 1024, 65536)</tt>.
 */
ReceiveBufferSizePredictorFactory getReceiveBufferSizePredictorFactory();
项目:android-netty    文件:NioSocketChannelConfig.java   
/**
 * Sets the {@link ReceiveBufferSizePredictor} which creates a new
 * {@link ReceiveBufferSizePredictor} when a new channel is created and
 * no {@link ReceiveBufferSizePredictor} was set.  If no predictor was set
 * for the channel, {@link #setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)}
 * will be called with the new predictor.  The default factory is
 * <tt>{@link AdaptiveReceiveBufferSizePredictorFactory}(64, 1024, 65536)</tt>.
 */
void setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory);