net.jxta.impl.util.pipe.reliable
Class FixedFlowControl
java.lang.Object
net.jxta.impl.util.pipe.reliable.FlowControl
net.jxta.impl.util.pipe.reliable.FixedFlowControl
public class FixedFlowControl
- extends FlowControl
Method Summary |
int |
ackEventEnd(int rQSize,
long aveRTT,
long lastRTT)
Concludes rwindow update for this ackEvent. |
int |
getRwindow()
Returns the rwindow size that this flow control module suggests to use
at this point in time. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_RWINDOW
static final int DEFAULT_RWINDOW
- See Also:
- Constant Field Values
maxRwindow
int maxRwindow
rwindow
int rwindow
FixedFlowControl
public FixedFlowControl()
- Constructs a fixed flow control module with a fixed rwindow of
DEFAULT_RWINDOW. It is not completely fixed. It grows by one
at every ack message until it reaches the set RWINDOW.
FixedFlowControl
public FixedFlowControl(int rwindow)
- Parameters:
rwindow
- Use the specified value as the constant rwindow
getRwindow
public int getRwindow()
- Returns the rwindow size that this flow control module suggests to use
at this point in time.
- Specified by:
getRwindow
in class FlowControl
- Returns:
- the remote window size
ackEventEnd
public int ackEventEnd(int rQSize,
long aveRTT,
long lastRTT)
- Concludes rwindow update for this ackEvent. That's where all the
smarts are. A number of externally computed parameters must be
passed.
- Specified by:
ackEventEnd
in class FlowControl
- Parameters:
rQSize
- the last known value of the remote queue size.aveRTT
- the latest estimate of the average RTT.lastRTT
- the RTT inferred from the most recent ACK message.
- Returns:
- int the new recommended value for rwindow.