java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.tunnel.pool.TunnelPeerSelector.PreConnectFailJob
- All Implemented Interfaces:
Job
- Enclosing class:
TunnelPeerSelector
Demotes a peer that could not be reached by a pre-connect probe.
Fired from OutNetMessage's failed-send path, so it runs only after the transport has exhausted its own retries for the probe. That distinguishes it from a single dropped packet: by then the peer has failed to answer across every transport we hold.
Uses ProfileOrganizer.demoteIfUnreachableNow(Hash) rather than the three-strike path because send-failure strikes already exist for in-use tunnels and count a congested path as much as a dead peer. A peer that cannot be connected to at all is unambiguous, and leaving it in the fast tier is what starves the pools.
Field Summary
Constructor Summary
ConstructorsConstructorDescriptionPreConnectFailJob(RouterContext ctx, Hash peer) Prepares to retry a failed pre-connect session.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
_peer
The peer to retry a session with.
Constructor Details
PreConnectFailJob
PreConnectFailJob(RouterContext ctx, Hash peer) Prepares to retry a failed pre-connect session.- Parameters:
ctx- the router contextpeer- the peer to retry
Method Details
getName
runJob
public void runJob()Description copied from interface:JobActually perform the task. This call blocks until the Job is complete.