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

class IterativeTimeoutJobextends JobImpl
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 Details

    • _peer

      private final Hash _peer
      The peer that did not answer.
  • Constructor Details

    • IterativeTimeoutJob

      public IterativeTimeoutJob(RouterContext ctx, Hash peer, IterativeSearchJob job)
      Create a timeout job for an iterative search.
      Parameters:
      ctx - the router context
      peer - the router hash whose search timed out
      job - the parent search job
  • 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
    • dropped

      public void dropped()
      Called when the job is dropped due to router overload. Still mark the peer as failed to prevent the search from hanging.
      Specified by:
      dropped in interface Job
      Overrides:
      dropped in class JobImpl