## net.i2p.router.peermanager
Class TunnelHistory

    java.lang.Object
      net.i2p.router.peermanager.TunnelHistory

    public class TunnelHistory

extends java.lang.Object

Tunnel related history information

Field Summary
`static int` `TUNNEL_REJECT_BANDWIDTH` tunnel rejection due to excess bandwidth usage
`static int` `TUNNEL_REJECT_CRIT` tunnel rejection due to system failure
`static int` `TUNNEL_REJECT_PROBABALISTIC_REJECT` probabalistic tunnel rejection due to a flood of requests
`static int` `TUNNEL_REJECT_TRANSIENT_OVERLOAD` tunnel rejection due to temporary cpu/job/tunnel overload

Constructor Summary
`TunnelHistory(RouterContext context, java.lang.String statGroup)`

Method Summary
`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` `getProcessFailureRate()`
`RateStat` `getProcessSuccessRate()`
`RateStat` `getRejectionRate()`
`void` `incrementAgreedTo()`
`void` `incrementFailed()`
`void` `incrementProcessed(int processedSuccessfully, int failedProcessing)`
`void` `incrementRejected(int severity)`
`void` `load(java.util.Properties props)`
`void` `setLastAgreedTo(long when)`
`void` `setLastFailed(long when)`
`void` `setLastRejectedBandwidth(long when)`
`void` `setLastRejectedCritical(long when)`
`void` `setLastRejectedProbabalistic(long when)`
`void` `setLastRejectedTransient(long when)`
`void` `setLifetimeAgreedTo(long num)`
`void` `setLifetimeFailed(long num)`
`void` `setLifetimeRejected(long num)`
`void` `store(java.io.OutputStream out)`

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

Field Detail

### TUNNEL_REJECT_PROBABALISTIC_REJECT

    public static final int TUNNEL_REJECT_PROBABALISTIC_REJECT

  probabalistic tunnel rejection due to a flood of requests

  See Also:
    Constant Field Values

### TUNNEL_REJECT_TRANSIENT_OVERLOAD

    public static final int TUNNEL_REJECT_TRANSIENT_OVERLOAD

  tunnel rejection due to temporary cpu/job/tunnel overload

  See Also:
    Constant Field Values

### TUNNEL_REJECT_BANDWIDTH

    public static final int TUNNEL_REJECT_BANDWIDTH

  tunnel rejection due to excess bandwidth usage

  See Also:
    Constant Field Values

### TUNNEL_REJECT_CRIT

    public static final int TUNNEL_REJECT_CRIT

  tunnel rejection due to system failure

  See Also:
    Constant Field Values

Constructor Detail

### TunnelHistory

    public TunnelHistory(RouterContext context,
                         java.lang.String statGroup)

Method Detail

### 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()

### setLifetimeAgreedTo

    public void setLifetimeAgreedTo(long num)

### setLifetimeRejected

    public void setLifetimeRejected(long num)

### setLifetimeFailed

    public void setLifetimeFailed(long num)

### setLastAgreedTo

    public void setLastAgreedTo(long when)

### setLastRejectedCritical

    public void setLastRejectedCritical(long when)

### setLastRejectedBandwidth

    public void setLastRejectedBandwidth(long when)

### setLastRejectedTransient

    public void setLastRejectedTransient(long when)

### setLastRejectedProbabalistic

    public void setLastRejectedProbabalistic(long when)

### setLastFailed

    public void setLastFailed(long when)

### getRejectionRate

    public RateStat getRejectionRate()

### getFailedRate

    public RateStat getFailedRate()

### getProcessSuccessRate

    public RateStat getProcessSuccessRate()

### getProcessFailureRate

    public RateStat getProcessFailureRate()

### coalesceStats

    public void coalesceStats()

### store

    public void store(java.io.OutputStream out)
               throws java.io.IOException

  Throws:
    `java.io.IOException`

### load

    public void load(java.util.Properties props)