public class TunnelHistory extends Object
Modifier and Type | Field and Description |
---|---|
static int |
TUNNEL_REJECT_BANDWIDTH
tunnel rejection due to excess bandwidth usage
|
static int |
TUNNEL_REJECT_CRIT
tunnel rejection due to system failure - essentially unused
|
static int |
TUNNEL_REJECT_PROBABALISTIC_REJECT
probabalistic tunnel rejection due to a flood of requests - essentially unused
|
static int |
TUNNEL_REJECT_TRANSIENT_OVERLOAD
tunnel rejection due to temporary cpu/job/tunnel overload - essentially unused
|
Constructor and Description |
---|
TunnelHistory(RouterContext context,
String statGroup) |
Modifier and Type | Method and Description |
---|---|
void |
coalesceStats() |
RateStat |
getFailedRate() |
long |
getLastAgreedTo()
when the peer last agreed to participate in a tunnel
|
long |
getLastFailed()
when the last tunnel the peer participated in failed
|
long |
getLastRejectedBandwidth()
when the peer last refused to participate in a tunnel complaining of bandwidth overload
|
long |
getLastRejectedCritical()
when the peer last refused to participate in a tunnel with level of critical
|
long |
getLastRejectedProbabalistic()
when the peer last refused to participate in a tunnel probabalistically
|
long |
getLastRejectedTransient()
when the peer last refused to participate in a tunnel complaining of transient overload
|
long |
getLifetimeAgreedTo()
total tunnels the peer has agreed to participate in
|
long |
getLifetimeFailed()
total tunnels the peer has agreed to participate in that were later marked as failed prematurely
|
long |
getLifetimeRejected()
total tunnels the peer has refused to participate in
|
RateStat |
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; }
|
void |
incrementAgreedTo() |
void |
incrementFailed(int pct)
Define this rate as the probability it really failed
|
void |
incrementProcessed(int processedSuccessfully,
int failedProcessing) |
void |
incrementRejected(int severity) |
void |
load(Properties props) |
void |
store(OutputStream out) |
public static final int TUNNEL_REJECT_PROBABALISTIC_REJECT
public static final int TUNNEL_REJECT_TRANSIENT_OVERLOAD
public static final int TUNNEL_REJECT_BANDWIDTH
public static final int TUNNEL_REJECT_CRIT
public TunnelHistory(RouterContext context, String statGroup)
public long getLifetimeAgreedTo()
public long getLifetimeRejected()
public long getLifetimeFailed()
public long getLastAgreedTo()
public long getLastRejectedCritical()
public long getLastRejectedBandwidth()
public long getLastRejectedTransient()
public long getLastRejectedProbabalistic()
public long getLastFailed()
public void incrementProcessed(int processedSuccessfully, int failedProcessing)
public void incrementAgreedTo()
public void incrementRejected(int severity)
severity
- how much the peer doesnt want to participate in the
tunnel (large == more severe)public void incrementFailed(int pct)
pct
- = probability * 100public RateStat getRejectionRate()
public RateStat getFailedRate()
public void coalesceStats()
public void store(OutputStream out) throws IOException
IOException
public void load(Properties props)