Package org.cache2k.core.timing
Class TimerTask
- java.lang.Object
-
- org.cache2k.core.timing.TimerTask
-
-
Constructor Summary
Constructors Constructor Description TimerTask()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaction()The action to be performed by this timer task.protected booleancancel()Not thread save to use directly, useTimer.cancel(TimerTask)It can happen that cancel is called on a task that is already executingStringgetState()booleanisCancelled()booleanisExecuted()booleanisScheduled()booleanisUnscheduled()voidrun()For the special case of immediate execution this implementsRunnable.StringtoString()
-
-
-
Method Detail
-
action
protected abstract void action()
The action to be performed by this timer task.
-
cancel
protected boolean cancel()
Not thread save to use directly, useTimer.cancel(TimerTask)It can happen that cancel is called on a task that is already executing- Returns:
- true, if really cancelled, to do resource cleanup in subclasses
-
run
public void run()
For the special case of immediate execution this implementsRunnable.
-
isUnscheduled
public boolean isUnscheduled()
-
isExecuted
public boolean isExecuted()
-
isCancelled
public boolean isCancelled()
-
isScheduled
public boolean isScheduled()
-
getState
public String getState()
-
-