|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.timers.TimerTask
public abstract class TimerTask

The base class to implement a task to be scheduled and executed by an FaultTolerantScheduler.
| Field Summary | |
|---|---|
protected boolean |
autoRemoval
if true the task is removed from the scheduler when it is executed the last time |
| Constructor Summary | |
|---|---|
TimerTask(TimerTaskData data)
|
|
| Method Summary | |
|---|---|
void |
beforeRecover()
Invoked before a task is recovered, after fail over, by default simply adjust start time. |
protected void |
cancel()
Cancels the execution of the task. |
TimerTaskData |
getData()
Retrieves the data associated with the task. |
ScheduledFuture<?> |
getScheduledFuture()
Retrieves the schedule future object that returns from the task scheduling. |
FaultTolerantScheduler |
getScheduler()
|
protected SetTimerAfterTxCommitRunnable |
getSetTimerTransactionalAction()
Retrieves the tx action to set the timer when the tx commits, not used in a non tx environment. |
protected void |
removeFromScheduler()
Self removal from the scheduler. |
void |
run()
|
abstract void |
runTask()
The method executed by the scheduler |
protected void |
setScheduledFuture(ScheduledFuture<?> scheduledFuture)
Sets the schedule future object that returns from the task scheduling. |
void |
setScheduler(FaultTolerantScheduler scheduler)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean autoRemoval
| Constructor Detail |
|---|
public TimerTask(TimerTaskData data)
data - | Method Detail |
|---|
public TimerTaskData getData()
protected SetTimerAfterTxCommitRunnable getSetTimerTransactionalAction()
public ScheduledFuture<?> getScheduledFuture()
protected void setScheduledFuture(ScheduledFuture<?> scheduledFuture)
scheduledFuture - protected void cancel()
public final void run()
run in interface Runnableprotected void removeFromScheduler()
public abstract void runTask()
public void beforeRecover()
public void setScheduler(FaultTolerantScheduler scheduler)
scheduler - the scheduler to setpublic FaultTolerantScheduler getScheduler()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||