java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.networkdb.kademlia.SearchJob.FailedJob
All Implemented Interfaces:
Job
Enclosing class:
SearchJob

protected class SearchJob.FailedJobextends JobImpl
Called when a particular peer failed to respond before the timeout was reached, or if the peer could not be contacted at all.
  • Field Details

    • _peer

      private Hash _peer
      Peer hash.
    • _isFloodfill

      private boolean _isFloodfill
      Floodfill flag.
    • _penalizePeer

      private boolean _penalizePeer
      Penalize peer flag.
    • _sentOn

      private long _sentOn
      Sent time.
  • Constructor Details

    • FailedJob

      public FailedJob(RouterContext enclosingContext, RouterInfo peer)
      Mark the peer as failed for this search.
      Parameters:
      enclosingContext - the router context
      peer - peer that was sent the search and is penalized on timeout
    • FailedJob

      public FailedJob(RouterContext enclosingContext, RouterInfo peer, boolean penalizePeer)
      Allow the choice as to whether failed searches should count against the peer (such as if we search for a random key).
      Parameters:
      enclosingContext - router context for the job queue and clock
      peer - peer the search was sent to, which is marked failed when the timeout runs out
      penalizePeer - true to record the timeout against the peer profile, false for searches of a random key
  • Method Details

    • runJob

      public void runJob()
      Notify the search of a peer timeout and optionally penalize.
    • getName

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