|
||||||||||
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.SearchJob
net.i2p.router.networkdb.kademlia.ExploreJob
class ExploreJob
Search for a particular key iteratively until we either find a value, we run out of peers, or the bucket the key belongs in has sufficient values in it. Well, we're skipping the 'bucket gets filled up' test for now, since it'll never get used (at least for a while).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.i2p.router.networkdb.kademlia.SearchJob |
---|
SearchJob.FailedJob |
Field Summary | |
---|---|
(package private) static int |
MAX_CLOSEST
only send the closest "dont tell me about" refs... |
(package private) static int |
PER_FLOODFILL_PEER_TIMEOUT
Override to make this shorter, since we don't sort out the unresponsive ff peers like we do in FloodOnlySearchJob |
Fields inherited from class net.i2p.router.networkdb.kademlia.SearchJob |
---|
_facade, _log, MIN_TIMEOUT |
Constructor Summary | |
---|---|
ExploreJob(RouterContext context,
KademliaNetworkDatabaseFacade facade,
Hash key)
Create a new search for the routingKey specified |
Method Summary | |
---|---|
protected I2NPMessage |
buildMessage(TunnelId replyTunnelId,
Hash replyGateway,
long expiration,
RouterInfo peer)
Build the database search message, but unlike the normal searches, we're more explicit in what we /dont/ want. |
protected int |
getBredth()
max # of concurrent searches |
String |
getName()
Descriptive name of the task |
protected void |
newPeersFound(int numNewPeers)
We've gotten a search reply that contained the specified number of peers that we didn't know about before. |
Methods inherited from class net.i2p.router.networkdb.kademlia.SearchJob |
---|
add, addDeferred, continueSearch, decrementOutstandingFloodfillSearches, fail, getExpiration, getFacade, getPerPeerTimeoutMs, getPerPeerTimeoutMs, getState, getTimeoutMs, onlyQueryFloodfillPeers, replyFound, runJob, searchNext, sendLeaseSearch, sendRouterSearch, sendSearch, timeoutMs, toString, wasAttempted |
Methods inherited from class net.i2p.router.JobImpl |
---|
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final int MAX_CLOSEST
static final int PER_FLOODFILL_PEER_TIMEOUT
Constructor Detail |
---|
public ExploreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key)
Method Detail |
---|
protected I2NPMessage buildMessage(TunnelId replyTunnelId, Hash replyGateway, long expiration, RouterInfo peer)
buildMessage
in class SearchJob
replyTunnelId
- tunnel to receive replies through, or our router hash if replyGateway is nullreplyGateway
- gateway for the reply tunnel, if null, we are sending direct, do not encryptexpiration
- when the search should stoppeer
- the peer to send it to
protected int getBredth()
getBredth
in class SearchJob
protected void newPeersFound(int numNewPeers)
newPeersFound
in class SearchJob
public String getName()
Job
getName
in interface Job
getName
in class SearchJob
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |