java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.networkdb.kademlia.IterativeLookupJob
- All Implemented Interfaces:
Job
Processes DatabaseSearchReplyMessage responses during iterative searches.
Handles the followup lookups for RouterInfo entries returned in DSRM messages during iterative Kademlia searches. For each peer hash in the reply, determines whether to fetch new RouterInfo data or refresh existing entries based on age and floodfill status.
Optimizes network integration by preferentially querying routers directly for their own RouterInfo when existing data is stale or the router is not confirmed as floodfill. This helps establish reliable floodfill peers and accelerates network discovery.
Extracted from IterativeLookupSelector to prevent deadlocks with the OutboundMessageRegistry during concurrent search operations.
Field Summary
Constructor Summary
ConstructorsConstructorDescriptionIterativeLookupJob(RouterContext ctx, DatabaseSearchReplyMessage dsrm, IterativeSearchJob search) Chase the hashes from the received DatabaseSearchReplyMessage, starting a followup search for each.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()
Constructor Details
IterativeLookupJob
public IterativeLookupJob(RouterContext ctx, DatabaseSearchReplyMessage dsrm, IterativeSearchJob search) Chase the hashes from the received DatabaseSearchReplyMessage, starting a followup search for each.- Parameters:
ctx- the router context, used for logging and for scheduling the followup jobsdsrm- the search reply being chased, supplying the hashes to look upsearch- the running search, whose wasQueried() check suppresses chasing a hash it just asked about
Method Details
runJob
public void runJob()Description copied from interface:JobActually perform the task. This call blocks until the Job is complete.getName