org.apache.derby.impl.services.timer
Class SingletonTimerFactory
- java.lang.Object
-
- org.apache.derby.impl.services.timer.SingletonTimerFactory
-
- All Implemented Interfaces:
- ModuleControl, TimerFactory
public class SingletonTimerFactory extends java.lang.Object implements TimerFactory, ModuleControl
This class implements the TimerFactory interface. It creates a singleton Timer instance. The class implements the ModuleControl interface, because it needs to cancel the Timer at system shutdown.- See Also:
TimerFactory,ModuleControl
-
-
Constructor Summary
Constructors Constructor and Description SingletonTimerFactory()Initializes this TimerFactory with a singleton Timer instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidboot(boolean create, java.util.Properties properties)Currently does nothing, singleton Timer instance is initialized in the constructor.voidcancel(java.util.TimerTask task)Cancel a task.java.lang.StringgetWarnings()Return any warnings generated during the initialization of this class, or null if nonevoidschedule(java.util.TimerTask task, long delay)Schedule a task.voidstop()Cancels the singleton Timer instance.
-
-
-
Constructor Detail
-
SingletonTimerFactory
public SingletonTimerFactory()
Initializes this TimerFactory with a singleton Timer instance.
-
-
Method Detail
-
schedule
public void schedule(java.util.TimerTask task, long delay)Description copied from interface:TimerFactorySchedule a task.- Specified by:
schedulein interfaceTimerFactory- Parameters:
task- the task to scheduledelay- how many milliseconds to wait before executing the task
-
cancel
public void cancel(java.util.TimerTask task)
Description copied from interface:TimerFactoryCancel a task.- Specified by:
cancelin interfaceTimerFactory- Parameters:
task- the task to cancel
-
boot
public void boot(boolean create, java.util.Properties properties) throws StandardExceptionCurrently does nothing, singleton Timer instance is initialized in the constructor. Implements the ModuleControl interface.- Specified by:
bootin interfaceModuleControl- Parameters:
create- not usedproperties- not used- Throws:
StandardException- not used- See Also:
ModuleControl
-
stop
public void stop()
Cancels the singleton Timer instance. Implements the ModuleControl interface.- Specified by:
stopin interfaceModuleControl- See Also:
ModuleControl
-
getWarnings
public java.lang.String getWarnings()
Return any warnings generated during the initialization of this class, or null if none- Returns:
- See legend
-
-
DataMelt 3.0 © DataMelt by jWork.ORG