java.lang.Object
net.i2p.router.tunnel.pool.TunnelPool.PoolState
- Enclosing class:
TunnelPool
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
FieldsModifier and TypeFieldDescription(package private) final intTunnels 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.PoolStateAll counts zero -- the pool really was empty.(package private) final intTunnels 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 intTunnels 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 intTunnels 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
ConstructorsConstructorDescriptionPoolState(int pooled, int usable, int lastResort, int backlogged) Records the four counts verbatim; the caller decides what each means.Method Summary
Field Details
EMPTY
All counts zero -- the pool really was empty.pooled
final int pooledTunnels 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 usableTunnels 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 lastResortTunnels 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 backloggedTunnels 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 timeusable- of those, the ones clearing the scan gates and not set asidelastResort- of those, the ones held back for last-resort use onlybacklogged- of those, the ones whose next peer is backlogged
Method Details
toString