Package dk.netarkivet.common.lifecycle
Class PeriodicTaskExecutor.PeriodicTask
- java.lang.Object
-
- dk.netarkivet.common.lifecycle.PeriodicTaskExecutor.PeriodicTask
-
- Enclosing class:
- PeriodicTaskExecutor
public static class PeriodicTaskExecutor.PeriodicTask extends Object
Represents a periodic task.
-
-
Constructor Summary
Constructors Constructor Description PeriodicTask(String taskId, Runnable task, long secondsBeforeFirstExec, long secondsBetweenExec)
Builds a new task.
-
-
-
Constructor Detail
-
PeriodicTask
public PeriodicTask(String taskId, Runnable task, long secondsBeforeFirstExec, long secondsBetweenExec)
Builds a new task.- Parameters:
taskId
- the task id string (should be unique)task
- the actualRunnable
object.secondsBeforeFirstExec
- the delay in seconds between starting the executor and the initial task execution.secondsBetweenExec
- the delay in seconds between two successive task executions.
-
-