java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.networkdb.kademlia.IterativeTimeoutJob
- All Implemented Interfaces:
Job
Handles timeout events for individual peer lookups in iterative searches.
Manages timeout scenarios for specific peer queries during iterative search operations. Unlike overall search timeouts, this handles individual peer response timeouts while allowing the broader iterative search to continue with other peers.
Coordinates with IterativeSearchJob to mark peers as failed when they don't respond within the expected time window. The decision whether a timeout actually occurred is delegated to the parent search job's failure detection logic.
Ensures robust iterative search behavior by handling unresponsive peers without disrupting the overall search progress.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HashThe peer that did not answer.private final IterativeSearchJobThe search this timeout belongs to.Constructor Summary
ConstructorsConstructorDescriptionIterativeTimeoutJob(RouterContext ctx, Hash peer, IterativeSearchJob job) Create a timeout job for an iterative search.Method Summary
All MethodsMethods inherited from class JobImpl
getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toStringModifier and TypeMethodDescriptionfinal 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
_search
The search this timeout belongs to._peer
The peer that did not answer.
Constructor Details
IterativeTimeoutJob
Create a timeout job for an iterative search.- Parameters:
ctx- the router contextpeer- the router hash whose search timed outjob- the parent search job
Method Details
runJob
public void runJob()Description copied from interface:JobActually perform the task. This call blocks until the Job is complete.getName
dropped