public class DefaultScheduler extends Object implements Scheduler
exiftool
Scheduler
.
Constructor and Description |
---|
DefaultScheduler(long delay)
Deprecated.
Use
DefaultScheduler(SchedulerDuration) instead. |
DefaultScheduler(long delay,
TimeUnit timeUnit)
Deprecated.
Use
DefaultScheduler(SchedulerDuration) instead. |
DefaultScheduler(SchedulerDuration executionDelay)
Create new scheduler.
|
DefaultScheduler(SchedulerDuration executionDelay,
SchedulerDuration terminationDelay)
Create new scheduler.
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
void |
shutdown()
Shutdown scheduler: once done, the scheduler will not be usable
anymore.
|
void |
start(Runnable runnable)
Schedule task.
|
void |
stop()
Stop pending task.
|
@Deprecated public DefaultScheduler(long delay)
DefaultScheduler(SchedulerDuration)
instead.TimeUnit.MILLISECONDS
.
A default withExecutor will be created.delay
- Delay.IllegalArgumentException
- If delay
is less than or equal to zero.@Deprecated public DefaultScheduler(long delay, TimeUnit timeUnit)
DefaultScheduler(SchedulerDuration)
instead.delay
- Delay.timeUnit
- Time Unit.NullPointerException
- If timeUnit
is null
.IllegalArgumentException
- If delay
is less than or equal to zero.public DefaultScheduler(SchedulerDuration executionDelay)
TimeUnit.MILLISECONDS
.
A default withExecutor will be created.executionDelay
- The delay between execution.IllegalArgumentException
- If delay
is less than or equal to zero.public DefaultScheduler(SchedulerDuration executionDelay, SchedulerDuration terminationDelay)
executionDelay
- The delay between scheduler execution.terminationDelay
- The delay to use to wait for termination when scheduler is shutting down.NullPointerException
- If timeUnit
is null
.IllegalArgumentException
- If delay
is less than or equal to zero.public void start(Runnable runnable)
Scheduler
public void stop()
Scheduler
public void shutdown()
Scheduler
Copyright © 2019. All rights reserved.