public class TimerScheduler extends AbstractLifeCycle implements Scheduler, java.lang.Runnable
| Modifier and Type | Class and Description |
|---|---|
private static class |
TimerScheduler.SimpleTask |
AbstractLifeCycle.AbstractLifeCycleListenerScheduler.TaskLifeCycle.Listener| Modifier and Type | Field and Description |
|---|---|
private boolean |
_daemon |
private java.lang.String |
_name |
private java.util.Timer |
_timer |
private static Logger |
LOG |
FAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING| Constructor and Description |
|---|
TimerScheduler() |
TimerScheduler(java.lang.String name,
boolean daemon) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart() |
protected void |
doStop() |
void |
run() |
Scheduler.Task |
schedule(java.lang.Runnable task,
long delay,
java.util.concurrent.TimeUnit units) |
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stopprivate static final Logger LOG
private final java.lang.String _name
private final boolean _daemon
private java.util.Timer _timer
public TimerScheduler()
public TimerScheduler(java.lang.String name,
boolean daemon)
protected void doStart()
throws java.lang.Exception
doStart in class AbstractLifeCyclejava.lang.Exceptionprotected void doStop()
throws java.lang.Exception
doStop in class AbstractLifeCyclejava.lang.Exceptionpublic Scheduler.Task schedule(java.lang.Runnable task, long delay, java.util.concurrent.TimeUnit units)
public void run()
run in interface java.lang.Runnable