Job
FloodfillStoreJob
class StoreJob extends JobImpl
Modifier and Type | Field | Description |
---|---|---|
protected Log |
_log |
|
protected StoreState |
_state |
|
static String |
MIN_STORE_VERSION |
private static boolean supportsBigLeaseSets(RouterInfo ri) {
String v = ri.getVersion();
return VersionComparator.comp(v, MIN_BIGLEASESET_VERSION) >= 0;
}
|
Constructor | Description |
---|---|
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) |
Modifier and Type | Method | Description |
---|---|---|
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.
|
(package private) static boolean |
shouldStoreTo(RouterInfo ri) |
Is it too old?
|
protected void |
succeed() |
Send was totally successful
|
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString
protected final Log _log
protected final StoreState _state
public static final String MIN_STORE_VERSION
public StoreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs)
public StoreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip)
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.public void runJob()
Job
protected int getParallelization()
protected int getRedundancy()
static boolean shouldStoreTo(RouterInfo ri)
protected void succeed()
protected void fail()