public final class Scheduler
extends java.lang.Object
implements java.util.concurrent.ThreadFactory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTIVATED |
static java.lang.String |
OFFSETMIN |
static java.lang.String |
PERIODMIN |
Modifier and Type | Method and Description |
---|---|
protected static long |
computeInitialDelayMillis(long currentMillis,
long offsetMillis,
long periodMillis) |
static Scheduler |
getInstance() |
java.lang.Thread |
newThread(java.lang.Runnable runner)
Provide a nice name for debugging and log thread creation.
|
void |
scheduleModuleRuns(java.util.Map<Key,java.lang.Class<? extends CollecTorMain>> collecTorMains,
Configuration conf)
Schedule all classes given according to the parameters in the
the configuration.
|
void |
shutdownScheduler()
Try to shutdown smoothly, i.e., wait for running tasks to terminate.
|
public static final java.lang.String ACTIVATED
public static final java.lang.String PERIODMIN
public static final java.lang.String OFFSETMIN
public static Scheduler getInstance()
public void scheduleModuleRuns(java.util.Map<Key,java.lang.Class<? extends CollecTorMain>> collecTorMains, Configuration conf)
protected static long computeInitialDelayMillis(long currentMillis, long offsetMillis, long periodMillis)
public void shutdownScheduler()
public java.lang.Thread newThread(java.lang.Runnable runner)
newThread
in interface java.util.concurrent.ThreadFactory