public class ExploreJob extends SearchJob
SearchJob.FailedJob| Modifier and Type | Field and Description |
|---|---|
(package private) static int | MAX_CLOSESTMaximum number of closest peers to exclude in queries. |
(package private) static int | PER_FLOODFILL_PEER_TIMEOUTTimeout per floodfill peer in milliseconds; shorter to avoid delays with unresponsive peers. |
(package private) static String | PROP_EXPLORE_BREDTHConfiguration property key for controlling the maximum concurrent exploratory searches. |
_facade, _log, MIN_TIMEOUT| Constructor and Description |
|---|
ExploreJob(RouterContext context,
KademliaNetworkDatabaseFacade facade,
Hash key,
boolean isRealExplore,
long msgIDBloomXor)Constructs a new ExploreJob with given parameters and calculates concurrency level. |
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean | add(Hash peer)This is called from SearchReplyJob |
protected I2NPMessage | buildMessage(TunnelId replyTunnelId,
Hash replyGateway,
long expiration,
RouterInfo peer)Builds the database lookup message to send to a peer. |
protected int | getBredth()Returns the maximum number of concurrent exploratory searches to run. |
String | getName()Descriptive name of the task |
protected void | newPeersFound(int numNewPeers)Called when the search has returned new peers that were previously unknown. |
(package private) void | replyFound(DatabaseSearchReplyMessage message,
Hash peer)Found a reply |
addDeferred, continueSearch, decrementOutstandingFloodfillSearches, fail, getExpiration, getFacade, getPerPeerTimeoutMs, getPerPeerTimeoutMs, getState, getTimeoutMs, onlyQueryFloodfillPeers, runJob, searchNext, sendLeaseSearch, sendRouterSearch, sendSearch, timeoutMs, toString, wasAttempteddropped, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeuestatic final int MAX_CLOSEST
static final int PER_FLOODFILL_PEER_TIMEOUT
static final String PROP_EXPLORE_BREDTH
public ExploreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, boolean isRealExplore, long msgIDBloomXor)
context - Router context providing environment and config accessfacade - Facade handling the Kademlia network database operationskey - Target key to explore/search forisRealExplore - True if this is a standard exploration (no floodfills returned),
false if a standard lookup (floodfills returned, useful when floodfill count is low)msgIDBloomXor - XOR value for message ID Bloom filter (used internally)boolean add(Hash peer)
protected I2NPMessage buildMessage(TunnelId replyTunnelId, Hash replyGateway, long expiration, RouterInfo peer)
buildMessage in class SearchJobreplyTunnelId - Tunnel ID for receiving replies, or null to send direct (no encryption)replyGateway - Gateway for the reply tunnel, or null for direct sendingexpiration - Absolute time when the message expirespeer - RouterInfo object representing the peer to which the message will be sentprotected int getBredth()
protected void newPeersFound(int numNewPeers)
newPeersFound in class SearchJobnumNewPeers - number of newly discovered peersvoid replyFound(DatabaseSearchReplyMessage message, Hash peer)
SearchJobreplyFound in class SearchJob