
public abstract class TimerTask extends Object implements Runnable
FaultTolerantScheduler.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoRemoval
if true the task is removed from the scheduler when it is executed the last time
|
| Constructor and Description |
|---|
TimerTask(TimerTaskData data) |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeRecover()
Invoked before a task is recovered, after fail over, by default simply adjust start time if it is a periodic timer.
|
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) |
protected boolean autoRemoval
public TimerTask(TimerTaskData data)
data - public TimerTaskData getData()
protected SetTimerAfterTxCommitRunnable getSetTimerTransactionalAction()
public ScheduledFuture<?> getScheduledFuture()
protected void setScheduledFuture(ScheduledFuture<?> scheduledFuture)
scheduledFuture - protected void cancel()
protected void removeFromScheduler()
public abstract void runTask()
public void beforeRecover()
public void setScheduler(FaultTolerantScheduler scheduler)
scheduler - the scheduler to setpublic FaultTolerantScheduler getScheduler()
Copyright © 2016. All Rights Reserved.