|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.JobImpl
net.i2p.router.networkdb.kademlia.FloodSearchJob
public class FloodSearchJob
Try sending a search to some floodfill peers, but if we don't get a successful match within half the allowed lookup time, give up and start querying through the normal (kademlia) channels. This should cut down on spurious lookups caused by simple delays in responses from floodfill peers NOTE: Unused directly - see FloodOnlySearchJob extension which overrides almost everything. TODO: Comment out or delete what we don't use here. Note that this does NOT extend SearchJob.
Field Summary | |
---|---|
protected long |
_created
|
protected boolean |
_dead
|
protected long |
_expiration
|
protected FloodfillNetworkDatabaseFacade |
_facade
|
protected boolean |
_isLease
|
protected Hash |
_key
|
protected Log |
_log
|
protected int |
_lookupsRemaining
|
protected List<Job> |
_onFailed
|
protected List<Job> |
_onFind
|
protected int |
_timeoutMs
|
protected static int |
CONCURRENT_SEARCHES
|
Constructor Summary | |
---|---|
FloodSearchJob(RouterContext ctx,
FloodfillNetworkDatabaseFacade facade,
Hash key,
Job onFind,
Job onFailed,
int timeoutMs,
boolean isLease)
|
Method Summary | |
---|---|
(package private) void |
addDeferred(Job onFind,
Job onFailed,
long timeoutMs,
boolean isLease)
Add jobs to an existing search |
protected int |
decrementRemaining()
TODO AtomicInteger? |
(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 |
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 |
---|
protected final Log _log
protected final FloodfillNetworkDatabaseFacade _facade
protected final Hash _key
protected final List<Job> _onFind
protected final List<Job> _onFailed
protected long _expiration
protected int _timeoutMs
protected final boolean _isLease
protected volatile int _lookupsRemaining
protected volatile boolean _dead
protected final long _created
protected static final int CONCURRENT_SEARCHES
Constructor Detail |
---|
public FloodSearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease)
onFind
- may be nullonFailed
- may be nullMethod Detail |
---|
public 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |