abstract class StoreJob extends JobImpl
Modifier and Type | Field and 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 39
|
static String |
MIN_STORE_LS2_VERSION |
static String |
MIN_STORE_VERSION
Short ECIES tunnel build messages (1.5.0)
|
Constructor and 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 and 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 |
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 successful
|
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, madeReady, requeue, toString
protected final Log _log
protected final StoreState _state
public static final String MIN_STORE_VERSION
public static final String MIN_STORE_LS2_VERSION
public static final String MIN_STORE_ENCLS2_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)
static boolean shouldStoreLS2To(RouterInfo ri)
static boolean shouldStoreEncLS2To(RouterInfo ri)
protected void succeed()
protected void fail()