org.jenkinsci.plugins.periodicreincarnation
Class PeriodicReincarnation
java.lang.Object
java.util.TimerTask
hudson.triggers.SafeTimerTask
hudson.model.PeriodicWork
hudson.model.AsyncPeriodicWork
org.jenkinsci.plugins.periodicreincarnation.PeriodicReincarnation
- All Implemented Interfaces:
- hudson.ExtensionPoint, Runnable
@Extension
public class PeriodicReincarnation
- extends hudson.model.AsyncPeriodicWork
Main class of the periodic reincarnation plug-in. Method execute is called
every minute but further functionality and restart of failed jobs happens
only when the time specified in the cron tab overlaps with the current
minute.
- Author:
- yboev
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Fields inherited from class hudson.model.AsyncPeriodicWork |
name |
| Fields inherited from class hudson.model.PeriodicWork |
DAY, HOUR, logger, MIN |
|
Method Summary |
protected void |
execute(hudson.model.TaskListener taskListener)
This method is called every minute. |
static PeriodicReincarnation |
get()
Returns this AsyncTask. |
long |
getRecurrencePeriod()
Recurrence will occur every minute, but action will be taken according to
the cron time set in the configuration. |
| Methods inherited from class hudson.model.AsyncPeriodicWork |
createListener, doRun, getLogFile |
| Methods inherited from class hudson.model.PeriodicWork |
all, getInitialDelay |
| Methods inherited from class hudson.triggers.SafeTimerTask |
run |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PeriodicReincarnation
public PeriodicReincarnation()
- Constructor.
execute
protected void execute(hudson.model.TaskListener taskListener)
- This method is called every minute. It contains the workflow of every
restart. If you want to understand what the plugin does, start from here.
- Specified by:
execute in class hudson.model.AsyncPeriodicWork
- Parameters:
taskListener - TaskListener
getRecurrencePeriod
public long getRecurrencePeriod()
- Recurrence will occur every minute, but action will be taken according to
the cron time set in the configuration. Only when this minute and the
cron tab time overlap.
- Specified by:
getRecurrencePeriod in class hudson.model.PeriodicWork
- Returns:
- The recurrence period in ms.
get
public static PeriodicReincarnation get()
- Returns this AsyncTask.
- Returns:
- the instance of PeriodicReincarnation which is currently running
Copyright © 2004–2014. All rights reserved.