public class SingletonTimerFactory extends java.lang.Object implements TimerFactory, ModuleControl
TimerFactory,
ModuleControl| Modifier and Type | Field and Description |
|---|---|
private java.util.Timer |
singletonTimer
Singleton Timer instance.
|
| Constructor and Description |
|---|
SingletonTimerFactory()
Initializes this TimerFactory with a singleton Timer instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
boot(boolean create,
java.util.Properties properties)
Currently does nothing, singleton Timer instance is initialized
in the constructor.
|
void |
cancel(java.util.TimerTask task)
Cancel a task.
|
(package private) java.util.Timer |
getCancellationTimer()
Returns a Timer object that can be used for adding TimerTasks
that cancel executing statements.
|
void |
schedule(java.util.TimerTask task,
long delay)
Schedule a task.
|
void |
stop()
Cancels the singleton Timer instance.
|
public SingletonTimerFactory()
java.util.Timer getCancellationTimer()
public void schedule(java.util.TimerTask task,
long delay)
schedule in interface TimerFactorytask - the task to scheduledelay - how many milliseconds to wait before executing the taskpublic void cancel(java.util.TimerTask task)
cancel in interface TimerFactorytask - the task to cancelpublic void boot(boolean create,
java.util.Properties properties)
throws StandardException
boot in interface ModuleControlStandardException - Module cannot be started.ModuleControlpublic void stop()
stop in interface ModuleControlModuleControlApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.