org.jenkinsci.plugins.periodicreincarnation
Class PeriodicReincarnation

java.lang.Object
  extended by java.util.TimerTask
      extended by hudson.triggers.SafeTimerTask
          extended by hudson.model.PeriodicWork
              extended by hudson.model.AsyncPeriodicWork
                  extended by 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 Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.AsyncPeriodicWork
name
 
Fields inherited from class hudson.model.PeriodicWork
DAY, HOUR, logger, MIN
 
Constructor Summary
PeriodicReincarnation()
          Constructor.
 
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.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeriodicReincarnation

public PeriodicReincarnation()
Constructor.

Method Detail

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.