Class StoreJob
java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.networkdb.kademlia.StoreJob
- All Implemented Interfaces:
Job
- Direct Known Subclasses:
FloodfillStoreJob
abstract class StoreJob extends JobImpl
Stores through this always request a reply.
Unused directly - see FloodfillStoreJob
-
Field Summary
Fields Modifier and Type Field Description protected Log
_log
protected StoreState
_state
static String
MIN_STORE_ENCLS2_VERSION
Was supported in 38, but they're now sigtype 11 which wasn't added until 39static String
MIN_STORE_LS2_VERSION
static String
MIN_STORE_VERSION
-
Constructor Summary
Constructors Constructor Description StoreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs)
Send a data structure to the floodfillsStoreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip)
-
Method Summary
Modifier and Type Method Description protected void
fail()
Send totally failedString
getName()
Descriptive name of the taskprotected int
getParallelization()
overridden in FSJprotected int
getRedundancy()
overridden in FSJvoid
runJob()
Actually perform the task.(package private) static boolean
shouldStoreEncLS2To(RouterInfo ri)
Is it new enough?(package private) static boolean
shouldStoreLS2To(RouterInfo ri)
Is it new enough?(package private) static boolean
shouldStoreTo(RouterInfo ri)
Is it new enough?protected void
succeed()
Send was totally successfulMethods inherited from class net.i2p.router.JobImpl
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString
-
Field Details
-
_log
-
_state
-
MIN_STORE_VERSION
- Since:
- 0.9.28
- See Also:
- Constant Field Values
-
MIN_STORE_LS2_VERSION
- Since:
- 0.9.38
- See Also:
- Constant Field Values
-
MIN_STORE_ENCLS2_VERSION
Was supported in 38, but they're now sigtype 11 which wasn't added until 39- Since:
- 0.9.39
- See Also:
- Constant Field Values
-
-
Constructor Details
-
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 Details
-
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 -
shouldStoreTo
Is it new enough?- Since:
- 0.9.33
-
shouldStoreLS2To
Is it new enough?- Since:
- 0.9.38
-
shouldStoreEncLS2To
Is it new enough?- Since:
- 0.9.39
-
succeed
protected void succeed()Send was totally successful -
fail
protected void fail()Send totally failed
-