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

项目: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 ReceiveBufferSizePredictor getReceiveBufferSizePredictor() {
    ReceiveBufferSizePredictor predictor = this.predictor;
    if (predictor == null) {
        try {
            this.predictor = predictor = getReceiveBufferSizePredictorFactory().getPredictor();
        } catch (Exception e) {
            throw new ChannelException("Failed to create a new " + ReceiveBufferSizePredictor.class.getSimpleName() + '.', e);
        }
    }
    return predictor;
}
项目:android-netty    文件:DefaultNioSocketChannelConfig.java   
public void setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor) {
    if (predictor == null) {
        throw new NullPointerException("predictor");
    }
    this.predictor = predictor;
}
项目:giraph-gora    文件:WrappedAdaptiveReceiveBufferSizePredictorFactory.java   
@Override
public ReceiveBufferSizePredictor getPredictor() throws Exception {
  return receiveBufferSizePredictor;
}
项目:giraph-research    文件:WrappedAdaptiveReceiveBufferSizePredictorFactory.java   
@Override
public ReceiveBufferSizePredictor getPredictor() throws Exception {
  return receiveBufferSizePredictor;
}
项目:giraph-research    文件:WrappedAdaptiveReceiveBufferSizePredictorFactory.java   
@Override
public ReceiveBufferSizePredictor getPredictor() throws Exception {
  return receiveBufferSizePredictor;
}
项目:giraph-research    文件:WrappedAdaptiveReceiveBufferSizePredictorFactory.java   
@Override
public ReceiveBufferSizePredictor getPredictor() throws Exception {
  return receiveBufferSizePredictor;
}
项目:android-netty    文件:NioSocketChannelConfig.java   
/**
 * Returns the {@link ReceiveBufferSizePredictor} which predicts the
 * number of readable bytes in the socket receive buffer.  The default
 * predictor is <tt>{@link AdaptiveReceiveBufferSizePredictor}(64, 1024, 65536)</tt>.
 */
ReceiveBufferSizePredictor getReceiveBufferSizePredictor();
项目:android-netty    文件:NioSocketChannelConfig.java   
/**
 * Sets the {@link ReceiveBufferSizePredictor} which predicts the
 * number of readable bytes in the socket receive buffer.  The default
 * predictor is <tt>{@link AdaptiveReceiveBufferSizePredictor}(64, 1024, 65536)</tt>.
 */
void setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor);