public class TestJob extends JobImpl
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_TEST_JOB_LIMIT
Maximum hard limit for total TestJob instances (queued + active).
|
static int |
maxQueuedTests |
| Constructor and Description |
|---|
TestJob(RouterContext ctx,
PooledTunnelCreatorConfig cfg,
TunnelPool pool) |
| Modifier and Type | Method and Description |
|---|---|
void |
dropped()
Called when the job is dropped due to router overload.
|
String |
getName()
Descriptive name of the task
|
boolean |
isValid()
Check if this TestJob instance is valid and should be queued.
|
void |
runJob()
Actually perform the task.
|
static boolean |
shouldSchedule(RouterContext ctx,
PooledTunnelCreatorConfig cfg)
Static method to check if a TestJob should be created and scheduled.
|
void |
testSuccessful(int ms)
Called when the tunnel test completes successfully.
|
getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toStringpublic static final int MAX_TEST_JOB_LIMIT
public static int maxQueuedTests
public TestJob(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool)
public void dropped()
public String getName()
Jobpublic boolean isValid()
public void runJob()
Jobpublic static boolean shouldSchedule(RouterContext ctx, PooledTunnelCreatorConfig cfg)
ctx - the router contextcfg - the tunnel configpublic void testSuccessful(int ms)
ms - time in milliseconds the test took to succeed