Package hudson.model
Class AsyncAperiodicWork
java.lang.Object
java.util.TimerTask
hudson.triggers.SafeTimerTask
hudson.model.AperiodicWork
hudson.model.AsyncAperiodicWork
- All Implemented Interfaces:
ExtensionPoint,Runnable
AperiodicWork that takes a long time to run. Similar to AsyncPeriodicWork, see AsyncPeriodicWork for
details and AperiodicWork for differences between AperiodicWork and PeriodicWork.- Since:
- 1.410
- Author:
- vjuranek
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.triggers.SafeTimerTask
SafeTimerTask.ExceptionRunnableNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsFields inherited from class hudson.model.AperiodicWork
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StreamTaskListenerfinal voidSchedules this periodic work now in a new thread, if one isn't already running.protected abstract voidexecute(TaskListener listener) Executes the task.protected LevelReturns the logging level at which error messages are displayed.protected FileDetermines the log file that records the result of this task.protected LevelReturns the logging level at which normal messages are displayed.protected LevelReturns the logging level at which previous task still executing messages is displayed.Methods inherited from class hudson.model.AperiodicWork
all, doRun, getInitialDelay, getNewInstance, getRecurrencePeriod, initMethods inherited from class hudson.triggers.SafeTimerTask
getLogsRoot, of, runMethods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Field Details
-
name
Name of the work.
-
-
Constructor Details
-
AsyncAperiodicWork
-
-
Method Details
-
doAperiodicRun
public final void doAperiodicRun()Schedules this periodic work now in a new thread, if one isn't already running.- Specified by:
doAperiodicRunin classAperiodicWork
-
createListener
-
getLogFile
Determines the log file that records the result of this task. -
getNormalLoggingLevel
Returns the logging level at which normal messages are displayed.- Returns:
- The logging level.
- Since:
- 1.651
-
getSlowLoggingLevel
Returns the logging level at which previous task still executing messages is displayed.- Returns:
- The logging level.
- Since:
- 1.651
-
getErrorLoggingLevel
Returns the logging level at which error messages are displayed.- Returns:
- The logging level.
- Since:
- 1.651
-
execute
Executes the task.- Parameters:
listener- Output sent will be reported to the users. (this work is TBD.)- Throws:
InterruptedException- The caller will record the exception and moves on.IOException- The caller will record the exception and moves on.
-