public abstract class AsyncAperiodicWork extends AperiodicWork
AperiodicWork
that takes a long time to run. Similar to AsyncPeriodicWork
, see AsyncPeriodicWork
for
details and AperiodicWork
for differences between AperiodicWork
and PeriodicWork
.SafeTimerTask.ExceptionRunnable
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
String |
name
Name of the work.
|
logger
Modifier | Constructor and Description |
---|---|
protected |
AsyncAperiodicWork(String name) |
Modifier and Type | Method and Description |
---|---|
protected StreamTaskListener |
createListener() |
void |
doAperiodicRun()
Schedules this periodic work now in a new thread, if one isn't already running.
|
protected abstract void |
execute(TaskListener listener)
Executes the task.
|
protected Level |
getErrorLoggingLevel()
Returns the logging level at which error messages are displayed.
|
protected File |
getLogFile()
Determines the log file that records the result of this task.
|
protected Level |
getNormalLoggingLevel()
Returns the logging level at which normal messages are displayed.
|
protected Level |
getSlowLoggingLevel()
Returns the logging level at which previous task still executing messages is displayed.
|
all, doRun, getInitialDelay, getNewInstance, getRecurrencePeriod, init
getLogsRoot, of, run
cancel, scheduledExecutionTime
public final String name
protected AsyncAperiodicWork(String name)
public final void doAperiodicRun()
doAperiodicRun
in class AperiodicWork
protected StreamTaskListener createListener()
protected File getLogFile()
protected Level getNormalLoggingLevel()
protected Level getSlowLoggingLevel()
protected Level getErrorLoggingLevel()
protected abstract void execute(TaskListener listener) throws IOException, InterruptedException
listener
- Output sent will be reported to the users. (this work is TBD.)InterruptedException
- The caller will record the exception and moves on.IOException
- The caller will record the exception and moves on.Copyright © 2004–2022. All rights reserved.