Class SearchState
- java.lang.Object
-
- net.i2p.router.networkdb.kademlia.SearchState
-
class SearchState extends Object
Data related to a particular search
-
-
Constructor Summary
Constructors Constructor Description SearchState(RouterContext context, Hash key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort()
void
addPending(Collection<Hash> pending)
void
addPending(Hash peer)
void
complete()
boolean
completed()
long
dataFound(Hash peer)
how long did it take to get the reply, or -1 if we don't knowSet<Hash>
getAttempted()
Set<Hash>
getClosestAttempted(int max)
Set<Hash>
getFailed()
Set<Hash>
getPending()
Set<Hash>
getRepliedPeers()
Set<Hash>
getSuccessful()
Hash
getTarget()
long
getWhenCompleted()
long
getWhenStarted()
boolean
isAborted()
void
removePending(Hash peer)
we didn't actually want to add this peer as part of the pending list...long
replyFound(Hash peer)
how long did it take to get the reply, or -1 if we dont knowvoid
replyTimeout(Hash peer)
String
toString()
boolean
wasAttempted(Hash peer)
-
-
-
Constructor Detail
-
SearchState
public SearchState(RouterContext context, Hash key)
-
-
Method Detail
-
getTarget
public Hash getTarget()
-
wasAttempted
public boolean wasAttempted(Hash peer)
-
completed
public boolean completed()
-
complete
public void complete()
-
isAborted
public boolean isAborted()
- Since:
- 0.9.16
-
abort
public void abort()
- Since:
- 0.9.16
-
getWhenStarted
public long getWhenStarted()
-
getWhenCompleted
public long getWhenCompleted()
-
addPending
public void addPending(Collection<Hash> pending)
-
addPending
public void addPending(Hash peer)
-
removePending
public void removePending(Hash peer)
we didn't actually want to add this peer as part of the pending list...
-
dataFound
public long dataFound(Hash peer)
how long did it take to get the reply, or -1 if we don't know
-
replyFound
public long replyFound(Hash peer)
how long did it take to get the reply, or -1 if we dont know
-
replyTimeout
public void replyTimeout(Hash peer)
-
-