Package org.hcjf.cloud.timer
Class CloudTimerTask
- java.lang.Object
-
- org.hcjf.cloud.timer.CloudTimerTask
-
- All Implemented Interfaces:
java.lang.Runnable
public abstract class CloudTimerTask extends java.lang.Object implements java.lang.Runnable- Author:
- javaito
-
-
Constructor Summary
Constructors Constructor Description CloudTimerTask(java.lang.String name)
-
Method Summary
Modifier and Type Method Description protected abstract java.lang.LonggetDelay()Return the delay value to each cycle of the task.protected voidonError(java.lang.Throwable throwable)Implements this method in order to process the error.protected abstract voidonRun()Custom logic implementation.voidrun()Implementation of the life cycle of the distributed timer task.
-
-
-
Method Detail
-
run
public final void run()
Implementation of the life cycle of the distributed timer task.- Specified by:
runin interfacejava.lang.Runnable
-
getDelay
protected abstract java.lang.Long getDelay()
Return the delay value to each cycle of the task.- Returns:
- Delay value.
-
onRun
protected abstract void onRun()
Custom logic implementation.
-
onError
protected void onError(java.lang.Throwable throwable)
Implements this method in order to process the error.- Parameters:
throwable- Throwable instance.
-
-