Package net.i2p.router.peermanager
Class PeerTestJob
java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.peermanager.PeerTestJob
- All Implemented Interfaces:
Job
class PeerTestJob extends JobImpl
Grab some peers that we want to test and probe them briefly to get some
more accurate and up to date performance data. This delegates the peer
selection to the peer manager and tests the peer by sending it a useless
database store message
TODO - What's the point? Disable this? See also notes in PeerManager.selectPeers().
TODO - Use something besides sending the peer's RI to itself?
-
Field Summary
Fields Modifier and Type Field Description static String
PROP_PEER_TEST_CONCURRENCY
static String
PROP_PEER_TEST_DELAY
static String
PROP_PEER_TEST_TIMEOUT
-
Constructor Summary
Constructors Constructor Description PeerTestJob(RouterContext context)
Creates a new instance of PeerTestJob -
Method Summary
Modifier and Type Method Description int
getAvgPeerTestTime()
String
getName()
Descriptive name of the taskint
getTotalAvgPeerTestTime()
void
runJob()
Actually perform the task.void
startTesting(PeerManager manager)
void
stopTesting()
Methods inherited from class net.i2p.router.JobImpl
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString
-
Field Details
-
PROP_PEER_TEST_DELAY
- See Also:
- Constant Field Values
-
PROP_PEER_TEST_CONCURRENCY
- See Also:
- Constant Field Values
-
PROP_PEER_TEST_TIMEOUT
- See Also:
- Constant Field Values
-
-
Constructor Details
-
PeerTestJob
Creates a new instance of PeerTestJob
-
-
Method Details
-
getAvgPeerTestTime
public int getAvgPeerTestTime() -
getTotalAvgPeerTestTime
public int getTotalAvgPeerTestTime()- Since:
- 0.9.49+
-
startTesting
-
stopTesting
public void stopTesting() -
getName
Description copied from interface:Job
Descriptive name of the task -
runJob
public void runJob()Description copied from interface:Job
Actually perform the task. This call blocks until the Job is complete.
-