java.lang.Object
net.i2p.client.streaming.impl.TCBShare.Entry
- Enclosing class:
TCBShare
A cached entry holding dampened TCB parameters for a remote peer.
Field Summary
Constructor Summary
ConstructorsConstructorDescriptionEntry(int ms, int wdw, int rttDev) Creates a new entry with the given initial values.Method Summary
All MethodsModifier and TypeMethodDescriptionintgetRTT()Returns the round trip time estimate.intReturns the RTT deviation estimate.intReturns the congestion window estimate.booleanChecks whether the entry has gone unused past the expire time.voidsetRTT(int ms) Sets the round trip time estimate.voidsetRTTDev(int count) Sets the RTT deviation estimate.voidsetWindowSize(int wdw) Sets the congestion window estimate.
Field Details
_rtt
int _rttThe round trip time estimate, in ms._wdw
int _wdwThe congestion window estimate._rttDev
int _rttDevThe RTT deviation estimate._updated
long _updatedWhen the entry was last updated.
Constructor Details
Entry
public Entry(int ms, int wdw, int rttDev) Creates a new entry with the given initial values.- Parameters:
ms- the initial RTT in millisecondswdw- the initial window sizerttDev- the initial RTT deviation
Method Details
getRTT
public int getRTT()Returns the round trip time estimate.- Returns:
- the estimate, in ms
setRTT
public void setRTT(int ms) Sets the round trip time estimate.- Parameters:
ms- the estimate, in ms
getRTTDev
public int getRTTDev()Returns the RTT deviation estimate.- Returns:
- the estimate, in ms
setRTTDev
public void setRTTDev(int count) Sets the RTT deviation estimate.- Parameters:
count- the new RTT deviation sample, in ms
getWindowSize
public int getWindowSize()Returns the congestion window estimate.- Returns:
- the estimate, in bytes
setWindowSize
public void setWindowSize(int wdw) Sets the congestion window estimate.- Parameters:
wdw- the new window sample, in bytes
isExpired
public boolean isExpired()Checks whether the entry has gone unused past the expire time.- Returns:
- true if expired