java.lang.Object
net.i2p.router.tunnel.pool.TunnelPool.PoolState
Enclosing class:
TunnelPool

static final class TunnelPool.PoolStateextends Object
Why a pool could not supply a tunnel, as counts rather than prose.

A bare "No tunnels available" cannot distinguish an empty pool from a full one whose tunnels are all ineligible, and the two call for opposite responses: the first is a build-supply problem, the second an eligibility or backpressure problem. The two fallback buckets are reported because a non-zero count there explains a null that the usable count alone would not.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final int
    Tunnels counted in the pool, those passing the selection gates, those held back for last-resort use, and those whose next peer is backlogged.
    (package private) static final TunnelPool.PoolState
    All counts zero -- the pool really was empty.
    (package private) final int
    Tunnels counted in the pool, those passing the selection gates, those held back for last-resort use, and those whose next peer is backlogged.
    (package private) final int
    Tunnels counted in the pool, those passing the selection gates, those held back for last-resort use, and those whose next peer is backlogged.
    (package private) final int
    Tunnels counted in the pool, those passing the selection gates, those held back for last-resort use, and those whose next peer is backlogged.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PoolState(int pooled, int usable, int lastResort, int backlogged)
    Records the four counts verbatim; the caller decides what each means.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
     

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • EMPTY

      static final TunnelPool.PoolState EMPTY
      All counts zero -- the pool really was empty.
    • pooled

      final int pooled
      Tunnels counted in the pool, those passing the selection gates, those held back for last-resort use, and those whose next peer is backlogged. All four are counts, not flags: a bucket is zero or more.
    • usable

      final int usable
      Tunnels counted in the pool, those passing the selection gates, those held back for last-resort use, and those whose next peer is backlogged. All four are counts, not flags: a bucket is zero or more.
    • lastResort

      final int lastResort
      Tunnels counted in the pool, those passing the selection gates, those held back for last-resort use, and those whose next peer is backlogged. All four are counts, not flags: a bucket is zero or more.
    • backlogged

      final int backlogged
      Tunnels counted in the pool, those passing the selection gates, those held back for last-resort use, and those whose next peer is backlogged. All four are counts, not flags: a bucket is zero or more.
  • Constructor Details

    • PoolState

      PoolState(int pooled, int usable, int lastResort, int backlogged)
      Records the four counts verbatim; the caller decides what each means.
      Parameters:
      pooled - tunnels in the pool at classification time
      usable - of those, the ones clearing the scan gates and not set aside
      lastResort - of those, the ones held back for last-resort use only
      backlogged - of those, the ones whose next peer is backlogged
  • Method Details