Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.netty.channel
Class FixedReceiveBufferSizePredictor

    java.lang.Object
      org.jboss.netty.channel.FixedReceiveBufferSizePredictor

All Implemented Interfaces:
  ReceiveBufferSizePredictor

    public class FixedReceiveBufferSizePredictor

extends Object
implements ReceiveBufferSizePredictor

The `ReceiveBufferSizePredictor` that always yields the same buffer size prediction. This predictor ignores the feed back from the I/O thread.

Version:
  $Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
Author:
  The Netty Project, Trustin Lee

Constructor Summary
`FixedReceiveBufferSizePredictor(int bufferSize)` Creates a new predictor that always returns the same prediction of the specified buffer size.

Method Summary
`int` | `nextReceiveBufferSize()` Predicts the capacity of the `ChannelBuffer` for the next read operation depending on the actual number of read bytes in the previous read operation.
`void` | `previousReceiveBufferSize(int previousReceiveBufferSize)` Updates this predictor by specifying the actual number of read bytes in the previous read operation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FixedReceiveBufferSizePredictor

    public FixedReceiveBufferSizePredictor(int bufferSize)

  Creates a new predictor that always returns the same prediction of the specified buffer size.

Method Detail

### nextReceiveBufferSize

    public int nextReceiveBufferSize()

  Description copied from interface: `ReceiveBufferSizePredictor`
  Predicts the capacity of the `ChannelBuffer` for the next read operation depending on the actual number of read bytes in the previous read operation.

  Specified by:
    `nextReceiveBufferSize` in interface `ReceiveBufferSizePredictor`
  Returns:
    the expected number of readable bytes this time

### previousReceiveBufferSize

    public void previousReceiveBufferSize(int previousReceiveBufferSize)

  Description copied from interface: `ReceiveBufferSizePredictor`
  Updates this predictor by specifying the actual number of read bytes in the previous read operation.

  Specified by:
    `previousReceiveBufferSize` in interface `ReceiveBufferSizePredictor`
  Parameters:
    `previousReceiveBufferSize` - the actual number of read bytes in the previous read operation

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.