@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; }
public ReceiveBufferSizePredictorFactory getReceiveBufferSizePredictorFactory() { return predictorFactory; }
public void setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory) { if (predictorFactory == null) { throw new NullPointerException("predictorFactory"); } this.predictorFactory = predictorFactory; }
/** * 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();
/** * 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);