Package net.i2p.router.peermanager
Class TunnelHistory
java.lang.Object
net.i2p.router.peermanager.TunnelHistory
public class TunnelHistory extends Object
Tunnel related history information
-
Field Summary
Fields Modifier and Type Field Description static intTUNNEL_REJECT_BANDWIDTHtunnel rejection due to excess bandwidth usagestatic intTUNNEL_REJECT_CRITtunnel rejection due to system failure - essentially unusedstatic intTUNNEL_REJECT_PROBABALISTIC_REJECTprobabalistic tunnel rejection due to a flood of requests - essentially unusedstatic intTUNNEL_REJECT_TRANSIENT_OVERLOADtunnel rejection due to temporary cpu/job/tunnel overload - essentially unused -
Constructor Summary
Constructors Constructor Description TunnelHistory(RouterContext context, String statGroup) -
Method Summary
Modifier and Type Method Description voidcoalesceStats()RateStatgetFailedRate()longgetLastAgreedTo()when the peer last agreed to participate in a tunnellonggetLastFailed()when the last tunnel the peer participated in failedlonggetLastRejectedBandwidth()when the peer last refused to participate in a tunnel complaining of bandwidth overloadlonggetLastRejectedCritical()when the peer last refused to participate in a tunnel with level of criticallonggetLastRejectedProbabalistic()when the peer last refused to participate in a tunnel probabalisticallylonggetLastRejectedTransient()when the peer last refused to participate in a tunnel complaining of transient overloadlonggetLifetimeAgreedTo()total tunnels the peer has agreed to participate inlonggetLifetimeFailed()total tunnels the peer has agreed to participate in that were later marked as failed prematurelylonggetLifetimeRejected()total tunnels the peer has refused to participate inRateStatgetRejectionRate()all unused public void setLifetimeAgreedTo(long num) { _lifetimeAgreedTo = num; } public void setLifetimeRejected(long num) { _lifetimeRejected = num; } public void setLifetimeFailed(long num) { _lifetimeFailed = num; } public void setLastAgreedTo(long when) { _lastAgreedTo = when; } public void setLastRejectedCritical(long when) { _lastRejectedCritical = when; } public void setLastRejectedBandwidth(long when) { _lastRejectedBandwidth = when; } public void setLastRejectedTransient(long when) { _lastRejectedTransient = when; } public void setLastRejectedProbabalistic(long when) { _lastRejectedProbabalistic = when; } public void setLastFailed(long when) { _lastFailed = when; }voidincrementAgreedTo()voidincrementFailed(int pct)Define this rate as the probability it really failedvoidincrementProcessed(int processedSuccessfully, int failedProcessing)voidincrementRejected(int severity)voidload(Properties props)voidstore(OutputStream out)voidstore(OutputStream out, boolean addComments)write out the data from the profile to the stream
-
Field Details
-
TUNNEL_REJECT_PROBABALISTIC_REJECT
public static final int TUNNEL_REJECT_PROBABALISTIC_REJECTprobabalistic tunnel rejection due to a flood of requests - essentially unused- See Also:
- Constant Field Values
-
TUNNEL_REJECT_TRANSIENT_OVERLOAD
public static final int TUNNEL_REJECT_TRANSIENT_OVERLOADtunnel rejection due to temporary cpu/job/tunnel overload - essentially unused- See Also:
- Constant Field Values
-
TUNNEL_REJECT_BANDWIDTH
public static final int TUNNEL_REJECT_BANDWIDTHtunnel rejection due to excess bandwidth usage- See Also:
- Constant Field Values
-
TUNNEL_REJECT_CRIT
public static final int TUNNEL_REJECT_CRITtunnel rejection due to system failure - essentially unused- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
getLifetimeAgreedTo
public long getLifetimeAgreedTo()total tunnels the peer has agreed to participate in -
getLifetimeRejected
public long getLifetimeRejected()total tunnels the peer has refused to participate in -
getLifetimeFailed
public long getLifetimeFailed()total tunnels the peer has agreed to participate in that were later marked as failed prematurely -
getLastAgreedTo
public long getLastAgreedTo()when the peer last agreed to participate in a tunnel -
getLastRejectedCritical
public long getLastRejectedCritical()when the peer last refused to participate in a tunnel with level of critical -
getLastRejectedBandwidth
public long getLastRejectedBandwidth()when the peer last refused to participate in a tunnel complaining of bandwidth overload -
getLastRejectedTransient
public long getLastRejectedTransient()when the peer last refused to participate in a tunnel complaining of transient overload -
getLastRejectedProbabalistic
public long getLastRejectedProbabalistic()when the peer last refused to participate in a tunnel probabalistically -
getLastFailed
public long getLastFailed()when the last tunnel the peer participated in failed -
incrementProcessed
public void incrementProcessed(int processedSuccessfully, int failedProcessing) -
incrementAgreedTo
public void incrementAgreedTo() -
incrementRejected
public void incrementRejected(int severity)- Parameters:
severity- how much the peer doesnt want to participate in the tunnel (large == more severe)
-
incrementFailed
public void incrementFailed(int pct)Define this rate as the probability it really failed- Parameters:
pct- = probability * 100
-
getRejectionRate
all unused public void setLifetimeAgreedTo(long num) { _lifetimeAgreedTo = num; } public void setLifetimeRejected(long num) { _lifetimeRejected = num; } public void setLifetimeFailed(long num) { _lifetimeFailed = num; } public void setLastAgreedTo(long when) { _lastAgreedTo = when; } public void setLastRejectedCritical(long when) { _lastRejectedCritical = when; } public void setLastRejectedBandwidth(long when) { _lastRejectedBandwidth = when; } public void setLastRejectedTransient(long when) { _lastRejectedTransient = when; } public void setLastRejectedProbabalistic(long when) { _lastRejectedProbabalistic = when; } public void setLastFailed(long when) { _lastFailed = when; } -
getFailedRate
-
coalesceStats
public void coalesceStats() -
store
- Throws:
IOException
-
store
write out the data from the profile to the stream- Parameters:
addComments- add comment lines to the output- Throws:
IOException- Since:
- 0.9.41
-
load
-