Class DefaultScheduler
java.lang.Object
com.thebuzzmedia.exiftool.core.schedulers.DefaultScheduler
- All Implemented Interfaces:
Scheduler
Default implementation for
This scheduler will execute a task in a specified amount of time:
exiftool
Scheduler
.
This scheduler will execute a task in a specified amount of time:
- Time must be specified during construction.
- Time unit (milliseconds, seconds, hours, etc.) may be defined during construction.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultScheduler
(long delay) Deprecated.DefaultScheduler
(long delay, TimeUnit timeUnit) Deprecated.UseDefaultScheduler(SchedulerDuration)
instead.DefaultScheduler
(SchedulerDuration executionDelay) Create new scheduler.DefaultScheduler
(SchedulerDuration executionDelay, SchedulerDuration terminationDelay) Create new scheduler. -
Method Summary
-
Constructor Details
-
DefaultScheduler
Deprecated.UseDefaultScheduler(SchedulerDuration)
instead.Create new scheduler. Default time unit isTimeUnit.MILLISECONDS
. A default withExecutor will be created.- Parameters:
delay
- Delay.- Throws:
IllegalArgumentException
- Ifdelay
is less than or equal to zero.
-
DefaultScheduler
Deprecated.UseDefaultScheduler(SchedulerDuration)
instead.Create new scheduler. A default withExecutor will be created.- Parameters:
delay
- Delay.timeUnit
- Time Unit.- Throws:
NullPointerException
- IftimeUnit
isnull
.IllegalArgumentException
- Ifdelay
is less than or equal to zero.
-
DefaultScheduler
Create new scheduler. Default time unit isTimeUnit.MILLISECONDS
. A default withExecutor will be created.- Parameters:
executionDelay
- The delay between execution.- Throws:
IllegalArgumentException
- Ifdelay
is less than or equal to zero.
-
DefaultScheduler
Create new scheduler. A default withExecutor will be created.- Parameters:
executionDelay
- The delay between scheduler execution.terminationDelay
- The delay to use to wait for termination when scheduler is shutting down.- Throws:
NullPointerException
- IftimeUnit
isnull
.IllegalArgumentException
- Ifdelay
is less than or equal to zero.
-
-
Method Details
-
start
Description copied from interface:Scheduler
Schedule task.
Task should not run immediately, instead it should run in a specified amount of time (implementation dependent). -
stop
public void stop()Description copied from interface:Scheduler
Stop pending task. -
shutdown
public void shutdown()Description copied from interface:Scheduler
Shutdown scheduler: once done, the scheduler will not be usable anymore.
-
DefaultScheduler(SchedulerDuration)
instead.