|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.util.FailSafeTimer
public class FailSafeTimer
A fail-safe timer in the sense that if the runtime environment restricts creating new threads, it doesn't blow up with an exception. TimerTasks that are scheduled will run at least once (inline when they are scheduled) if creating threads is not allowed. For example, Google App Engine does not allow creation of new threads.
Clients should not use this as a general purpose timing service. To do so could interfere with the running of the Cache.
Constructor Summary | |
---|---|
FailSafeTimer(String name)
Constructor accepting a name for the timer. |
Method Summary | |
---|---|
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(TimerTask task,
Date time)
If the runtime environment restricts thread creation, the task is run inline for only one time. |
void |
schedule(TimerTask task,
Date firstTime,
long period)
If the runtime environment restricts thread creation, the task is run inline for only one time. |
void |
schedule(TimerTask task,
long delay)
If the runtime environment restricts thread creation, the task is run inline for only one time. |
void |
schedule(TimerTask task,
long delay,
long period)
If the runtime environment restricts thread creation, the task is run inline for only one time. |
void |
scheduleAtFixedRate(TimerTask task,
Date firstTime,
long period)
If the runtime environment restricts thread creation, the task is run inline for only one time. |
void |
scheduleAtFixedRate(TimerTask task,
long delay,
long period)
If the runtime environment restricts thread creation, the task is run inline for only one time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FailSafeTimer(String name)
name
- Method Detail |
---|
public void cancel()
Timer.cancel()
public int purge()
Timer.purge()
public void schedule(TimerTask task, Date firstTime, long period)
Timer.schedule(java.util.TimerTask, java.util.Date, long)
public void schedule(TimerTask task, Date time)
Timer.schedule(java.util.TimerTask, java.util.Date)
public void schedule(TimerTask task, long delay, long period)
Timer.schedule(java.util.TimerTask, long, long)
public void schedule(TimerTask task, long delay)
Timer.schedule(java.util.TimerTask, long)
public void scheduleAtFixedRate(TimerTask task, Date firstTime, long period)
Timer.scheduleAtFixedRate(java.util.TimerTask, java.util.Date, long)
public void scheduleAtFixedRate(TimerTask task, long delay, long period)
Timer.scheduleAtFixedRate(java.util.TimerTask, long, long)
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |