public class FailSafeTimer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Timer |
timer |
private boolean |
timerThreadRunning |
Constructor and Description |
---|
FailSafeTimer(java.lang.String name)
Constructor accepting a name for the timer.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
If the runtime environment restricts thread creation, this method does
nothing.
|
int |
purge()
If the runtime environment restricts thread creation, this method does
nothing.
|
void |
schedule(java.util.TimerTask task,
java.util.Date time)
If the runtime environment restricts thread creation, the task is run
inline for only one time.
|
void |
schedule(java.util.TimerTask task,
java.util.Date firstTime,
long period)
If the runtime environment restricts thread creation, the task is run
inline for only one time.
|
void |
schedule(java.util.TimerTask task,
long delay)
If the runtime environment restricts thread creation, the task is run
inline for only one time.
|
void |
schedule(java.util.TimerTask task,
long delay,
long period)
If the runtime environment restricts thread creation, the task is run
inline for only one time.
|
void |
scheduleAtFixedRate(java.util.TimerTask task,
java.util.Date firstTime,
long period)
If the runtime environment restricts thread creation, the task is run
inline for only one time.
|
void |
scheduleAtFixedRate(java.util.TimerTask task,
long delay,
long period)
If the runtime environment restricts thread creation, the task is run
inline for only one time.
|
private final java.util.Timer timer
private final boolean timerThreadRunning
public FailSafeTimer(java.lang.String name)
name
- public void cancel()
Timer.cancel()
public int purge()
Timer.purge()
public void schedule(java.util.TimerTask task, java.util.Date firstTime, long period)
Timer.schedule(java.util.TimerTask, java.util.Date, long)
public void schedule(java.util.TimerTask task, java.util.Date time)
Timer.schedule(java.util.TimerTask, java.util.Date)
public void schedule(java.util.TimerTask task, long delay, long period)
Timer.schedule(java.util.TimerTask, long, long)
public void schedule(java.util.TimerTask task, long delay)
Timer.schedule(java.util.TimerTask, long)
public void scheduleAtFixedRate(java.util.TimerTask task, java.util.Date firstTime, long period)
Timer.scheduleAtFixedRate(java.util.TimerTask, java.util.Date, long)
public void scheduleAtFixedRate(java.util.TimerTask task, long delay, long period)
Timer.scheduleAtFixedRate(java.util.TimerTask, long, long)