net.i2p.router.networkdb.kademlia
Class StoreJob

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

 class StoreJob
extends JobImpl

Stores through this always request a reply. Unused directly - see FloodfillStoreJob


Field Summary
protected  Log _log
           
protected  StoreState _state
           
 
Constructor Summary
StoreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs)
          Send a data structure to the floodfills
StoreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip)
           
 
Method Summary
protected  void fail()
          Send totally failed
 String getName()
          Descriptive name of the task
protected  int getParallelization()
          overridden in FSJ
protected  int getRedundancy()
          overridden in FSJ
 void runJob()
          Actually perform the task.
protected  void succeed()
          Send was totally successful
static boolean supportsBigLeaseSets(RouterInfo ri)
          Does he support more than 6 leasesets?
static boolean supportsCert(RouterInfo ri, Certificate cert)
          Does this router understand this cert?
 
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
 

Field Detail

_log

protected final Log _log

_state

protected final StoreState _state
Constructor Detail

StoreJob

public StoreJob(RouterContext context,
                KademliaNetworkDatabaseFacade facade,
                Hash key,
                DatabaseEntry data,
                Job onSuccess,
                Job onFailure,
                long timeoutMs)
Send a data structure to the floodfills


StoreJob

public StoreJob(RouterContext context,
                KademliaNetworkDatabaseFacade facade,
                Hash key,
                DatabaseEntry data,
                Job onSuccess,
                Job onFailure,
                long timeoutMs,
                Set<Hash> toSkip)
Parameters:
toSkip - set of peer hashes of people we dont want to send the data to (e.g. we already know they have it). This can be null.
Method Detail

getName

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


runJob

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


getParallelization

protected int getParallelization()
overridden in FSJ


getRedundancy

protected int getRedundancy()
overridden in FSJ


supportsCert

public static boolean supportsCert(RouterInfo ri,
                                   Certificate cert)
Does this router understand this cert?

Returns:
true if not a key cert
Since:
0.9.12

supportsBigLeaseSets

public static boolean supportsBigLeaseSets(RouterInfo ri)
Does he support more than 6 leasesets?

Since:
0.9.12

succeed

protected void succeed()
Send was totally successful


fail

protected void fail()
Send totally failed