Class TimerScheduler
- java.lang.Object
-
- com.thebuzzmedia.exiftool.core.schedulers.TimerScheduler
-
- All Implemented Interfaces:
Scheduler
public class TimerScheduler extends Object implements Scheduler
Scheduler usingTimer
as internal task scheduler.
This scheduler should be used only for compatibility reason (this was the very first kind of scheduler available), instead instance ofDefaultScheduler
should be used.
-
-
Constructor Summary
Constructors Constructor Description TimerScheduler(String name, long delay)
Create scheduler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
TimerScheduler
public TimerScheduler(String name, long delay)
Create scheduler.- Parameters:
name
- Thread name.delay
- Delay before task execution.- Throws:
IllegalArgumentException
- Ifdelay
is not strictly positive.
-
-
Method Detail
-
start
public void start(Runnable runnable)
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.
-
-