java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.networkdb.kademlia.IterativeLookupJob
All Implemented Interfaces:
Job

class IterativeLookupJobextends JobImpl
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.

  • 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 jobs
      dsrm - the search reply being chased, supplying the hashes to look up
      search - the running search, whose wasQueried() check suppresses chasing a hash it just asked about
  • Method Details

    • runJob

      public void runJob()
      Description copied from interface: Job
      Actually perform the task. This call blocks until the Job is complete.
    • getName

      public String getName()
      Description copied from interface: Job
      Descriptive name of the task.
      Returns:
      the descriptive name of the task