org.jvnet.hudson.plugins.thinbackup.hudson.model
Class AsyncPeriodicWork
java.lang.Object
java.util.TimerTask
hudson.triggers.SafeTimerTask
hudson.model.PeriodicWork
org.jvnet.hudson.plugins.thinbackup.hudson.model.AsyncPeriodicWork
- All Implemented Interfaces:
- hudson.ExtensionPoint, Runnable
- Direct Known Subclasses:
- ThinBackupPeriodicWork
public abstract class AsyncPeriodicWork
- extends hudson.model.PeriodicWork
Duplicated code from hudson.model.AsyncPeriodicWork to reduce the log levels in doRun() from INFO to
FINEST so the logs are not spammed.
All other functionality is exactly the same as in the original class.
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Fields inherited from class hudson.model.PeriodicWork |
DAY, HOUR, logger, MIN |
|
Method Summary |
protected hudson.util.StreamTaskListener |
createListener()
|
void |
doRun()
Schedules this periodic work now in a new thread, if one isn't already running. |
protected abstract void |
execute(hudson.model.TaskListener listener)
Executes the task. |
protected File |
getLogFile()
Determines the log file that records the result of this task. |
| Methods inherited from class hudson.model.PeriodicWork |
all, getInitialDelay, getRecurrencePeriod |
| 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 |
name
public final String name
- Name of the work.
AsyncPeriodicWork
protected AsyncPeriodicWork(String name)
doRun
public final void doRun()
- Schedules this periodic work now in a new thread, if one isn't already running.
- Specified by:
doRun in class hudson.triggers.SafeTimerTask
createListener
protected hudson.util.StreamTaskListener createListener()
getLogFile
protected File getLogFile()
- Determines the log file that records the result of this task.
execute
protected abstract void execute(hudson.model.TaskListener listener)
throws IOException,
InterruptedException
- Executes the task. Subclasses implement this method and can carry out a long-running 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.
Copyright © 2004-2013. All Rights Reserved.