net.i2p.router.networkdb.kademlia
Class FloodSearchJob

java.lang.Object
  extended by net.i2p.router.JobImpl
      extended by net.i2p.router.networkdb.kademlia.FloodSearchJob
All Implemented Interfaces:
Job
Direct Known Subclasses:
FloodOnlySearchJob

 class FloodSearchJob
extends JobImpl

Try sending a search to some floodfill peers, but if we don't get a successful match within half the allowed lookup time, give up and start querying through the normal (kademlia) channels. This should cut down on spurious lookups caused by simple delays in responses from floodfill peers


Constructor Summary
FloodSearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease)
           
 
Method Summary
(package private)  void addDeferred(Job onFind, Job onFailed, long timeoutMs, boolean isLease)
           
(package private)  void decrementRemaining()
           
(package private)  void failed()
           
 long getExpiration()
           
(package private)  Hash getKey()
           
(package private)  int getLookupsRemaining()
           
 java.lang.String getName()
          Descriptive name of the task
 void runJob()
          Actually perform the task.
(package private)  void success()
           
 
Methods inherited from class net.i2p.router.JobImpl
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FloodSearchJob

public FloodSearchJob(RouterContext ctx,
                      FloodfillNetworkDatabaseFacade facade,
                      Hash key,
                      Job onFind,
                      Job onFailed,
                      int timeoutMs,
                      boolean isLease)
Method Detail

addDeferred

void addDeferred(Job onFind,
                 Job onFailed,
                 long timeoutMs,
                 boolean isLease)

getExpiration

public long getExpiration()

runJob

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


getName

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


getKey

Hash getKey()

decrementRemaining

void decrementRemaining()

getLookupsRemaining

int getLookupsRemaining()

failed

void failed()

success

void success()