Documentation of 'org.apache.derby.impl.services.timer.SingletonTimerFactory' Java class
SingletonTimerFactory
org.apache.derby.impl.services.timer

Class 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
      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.
      java.lang.String getWarnings()
      Return any warnings generated during the initialization of this class, or null if none
      void schedule(java.util.TimerTask task, long delay)
      Schedule a task.
      void stop()
      Cancels the singleton Timer instance.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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: TimerFactory
        Schedule a task.
        Specified by:
        schedule in interface TimerFactory
        Parameters:
        task - the task to schedule
        delay - how many milliseconds to wait before executing the task
      • cancel

        public void cancel(java.util.TimerTask task)
        Description copied from interface: TimerFactory
        Cancel a task.
        Specified by:
        cancel in interface TimerFactory
        Parameters:
        task - the task to cancel
      • boot

        public void boot(boolean create,
                         java.util.Properties properties)
                  throws StandardException
        Currently does nothing, singleton Timer instance is initialized in the constructor. Implements the ModuleControl interface.
        Specified by:
        boot in interface ModuleControl
        Parameters:
        create - not used
        properties - not used
        Throws:
        StandardException - not used
        See Also:
        ModuleControl
      • stop

        public void stop()
        Cancels the singleton Timer instance. Implements the ModuleControl interface.
        Specified by:
        stop in interface ModuleControl
        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

Ads help maintain this website.