Packages that use TunnelPool.TunnelStats
Package
Description
Tunnel pool management: pool lifecycle, peer selection, build scheduling and failure handling for client and exploratory tunnels.
Uses of TunnelPool.TunnelStats in net.i2p.router.tunnel.pool
Methods in net.i2p.router.tunnel.pool that return TunnelPool.TunnelStatsModifier and TypeMethodDescriptionprivate TunnelPool.TunnelStatsTunnelPool.sweepExpiredAndCountTunnels(long now, long preBuildThreshold) Drops expired tunnels and counts the rest.Methods in net.i2p.router.tunnel.pool with parameters of type TunnelPool.TunnelStatsModifier and TypeMethodDescriptionprivate static voidTunnelPool.addStrandedTest(TunnelPool.TunnelStats stats, PooledTunnelCreatorConfig cfg) Collect a tunnel for the stranded re-offer, bounded byTestJob.MAX_STRANDED_OFFERS_PER_SWEEPper sweep.private voidTunnelPool.buildDeficitReplacements(TunnelPool.TunnelStats stats, int target, int effectiveTarget, long now) Proactive replacement: when safeActive is below effectiveTarget and tunnels are expiring within the pre-build window (or the LeaseSet is incomplete), build the deficit now so replacements are ready before the old tunnels die — preventing synchronized expiry cascades.private intTunnelPool.computeDeficit(TunnelPool.TunnelStats stats, int target, int effectiveTarget, int currentInProgress) Compute the build deficit.private static intTunnelPool.countHealthySafe(TunnelPool.TunnelStats stats) Safe tunnels that are not soft-degraded.private voidTunnelPool.countLiveTunnel(TunnelInfo t, TunnelPool.TunnelStats stats, long preBuildThreshold) Count a live non-UNTESTED tunnel: safe when it outlives the pre-build window, else near expiry.private voidTunnelPool.handleEmergencyIfNeeded(TunnelPool.TunnelStats stats, int target) EMERGENCY rebuild: fires only when zero usable tunnels remain (no safe, none expiring, none untested).private voidTunnelPool.handleStaleUntested(Iterator<TunnelInfo> it, TunnelInfo t, TunnelPool.TunnelStats stats, long now, long wallNow, long preBuildThreshold) Handle an UNTESTED tunnel: a tunnel still UNTESTED within the pre-build window (expiring in < 3 min) is stuck — the test queue never reached it (saturated) or it was abandoned after a pool reset.private booleanTunnelPool.isDeficitBuildNeeded(TunnelPool.TunnelStats stats, int effectiveTarget) Whether a deficit build is warranted: some tunnels expiring soon, none safe, soft-degraded presence below healthy capacity, or an incomplete LeaseSet that needs more GOOD tunnels — but not when the incomplete-LeaseSet trigger is already satisfied by the current healthy good+untested count.private booleanTunnelPool.isEmergencySituation(TunnelPool.TunnelStats stats) Whether the pool is in the emergency condition: zero safe, expiring and untested tunnels, no still-valid (soft-degraded / FAILING) tunnels left to ride out, and not a ping pool.private voidTunnelPool.logCleanupSummary(TunnelPool.TunnelStats stats) Warn once per cycle when zombie or stale untested tunnels were removed.private voidTunnelPool.offerStrandedTests(TunnelPool.TunnelStats stats) Offer tunnels that have never produced a latency reading.private voidTunnelPool.scheduleLastChanceTests(TunnelPool.TunnelStats stats) Offer one last-chance test for each stale-but-testable UNTESTED tunnel the sweep kept.private booleanTunnelPool.shouldSkipDueToPairedPool(TunnelPool.TunnelStats stats) IB/OB balance: don't emergency-build if this direction already has MORE usable tunnels than its paired direction.