java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.tunnel.pool.TunnelPoolManager.RemoveSlowTunnelsJob
- All Implemented Interfaces:
Job
- Enclosing class:
TunnelPoolManager
Periodically drops tunnels that fail the latency test.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TunnelPoolManagerThe manager whose pools are checked.private static final AtomicIntegerPasses run so far.private static final longThe first pass runs 90 seconds after startup.Constructor Summary
ConstructorsConstructorDescriptionRemove slow tunnels periodically, starting after the startup delay.Method Summary
All MethodsMethods inherited from class JobImpl
dropped, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toStringModifier and TypeMethodDescriptionvoiddropped()Default implementation does nothing.final RouterContextThe router context that this job belongs to.longgetJobId()The unique job ID for this job.longThe timestamp when this job was last made ready for execution.The timing object for this job.voidmadeReady(long now) For JobQueue only, not for external use.protected voidrequeue(long delayMs) Requeue this job to run after the specified delay.toString()
Field Details
_mgr
The manager whose pools are checked.STARTUP_DELAY
private static final long STARTUP_DELAYThe first pass runs 90 seconds after startup.- See Also:
_runCount
Passes run so far.
Constructor Details
RemoveSlowTunnelsJob
Remove slow tunnels periodically, starting after the startup delay.- Parameters:
ctx- the router contextmgr- the pool manager
Method Details
getName
runJob
public void runJob()Remove slow tunnels and reschedule. Per-pool cost is bounded byTunnelPool.ensureSufficientTunnels()gates; this job itself runs on the configured interval (default 60s). No global collapse bypass: recovery paths (ExpireJob, buildComplete, emergency) already handle collapsed pools per-pool.