public class FloodSearchJob extends JobImpl
Modifier and Type | Field and Description |
---|---|
protected long |
_created |
protected boolean |
_dead |
protected long |
_expiration |
protected FloodfillNetworkDatabaseFacade |
_facade |
protected boolean |
_isLease |
protected Hash |
_key |
protected Log |
_log |
protected AtomicInteger |
_lookupsRemaining |
protected List<Job> |
_onFailed |
protected List<Job> |
_onFind |
protected boolean |
_success |
protected int |
_timeoutMs |
protected static int |
CONCURRENT_SEARCHES |
Constructor and Description |
---|
FloodSearchJob(RouterContext ctx,
FloodfillNetworkDatabaseFacade facade,
Hash key,
Job onFind,
Job onFailed,
int timeoutMs,
boolean isLease) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addDeferred(Job onFind,
Job onFailed,
long timeoutMs,
boolean isLease)
Add jobs to an existing search
|
protected int |
decrementRemaining() |
(package private) void |
failed()
Deprecated, unused, see FOSJ override
|
long |
getCreated()
System time, NOT context time
|
long |
getExpiration()
using context clock
|
protected Hash |
getKey() |
protected int |
getLookupsRemaining() |
String |
getName()
Deprecated, unused, see FOSJ override
|
void |
runJob()
Deprecated, unused, see FOSJ override
|
(package private) void |
success()
Deprecated, unused, see FOSJ override
|
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString
protected final Log _log
protected final FloodfillNetworkDatabaseFacade _facade
protected final Hash _key
protected long _expiration
protected int _timeoutMs
protected final boolean _isLease
protected final AtomicInteger _lookupsRemaining
protected volatile boolean _dead
protected final long _created
protected boolean _success
protected static final int CONCURRENT_SEARCHES
public FloodSearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease)
onFind
- may be nullonFailed
- may be nullpublic long getCreated()
void addDeferred(Job onFind, Job onFailed, long timeoutMs, boolean isLease)
onFind
- may be nullonFailed
- may be nulltimeoutMs
- ignoredisLease
- ignoredpublic long getExpiration()
public void runJob()
public String getName()
protected Hash getKey()
protected int decrementRemaining()
protected int getLookupsRemaining()
void failed()
void success()