Class GerritTriggerTimer
java.lang.Object
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerTimer
Manages the timer that is used for each GerritTrigger TimerTask that
is active.
- Author:
- Fredrik Abrahamson <fredrik.abrahamson@sonymobile.com>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final longWait this many milliseconds before the first call to a TimerTask. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel(GerritTriggerTimerTask timerTask) Cancel a TimerTask.static GerritTriggerTimerReturns the instance, and creates it first if needed.voidschedule(GerritTriggerTimerTask timerTask, GerritTrigger trigger) Schedule a TimerTask according to the two constants above.
-
Field Details
-
DELAY_MILLISECONDS
protected static final long DELAY_MILLISECONDSWait this many milliseconds before the first call to a TimerTask.- See Also:
-
-
Method Details
-
getInstance
Returns the instance, and creates it first if needed.- Returns:
- the instance of this class
-
schedule
Schedule a TimerTask according to the two constants above.- Parameters:
trigger- the trigger associated with the tasktimerTask- the TimerTask to be scheduled
-
cancel
Cancel a TimerTask.- Parameters:
timerTask- the TimerTask to cancel
-