Class ReschedulableTimer

java.lang.Object
java.lang.Thread
org.ka2ddo.util.ReschedulableTimer
All Implemented Interfaces:
Runnable

public final class ReschedulableTimer extends Thread
This class implements a timer whose tasks' delivery times can be adjusted while they are enqueued, and the task objects can be reused after they have been timed out or cancelled.
Author:
Andrew Pavlin, KA2DDO
  • Constructor Details

    • ReschedulableTimer

      public ReschedulableTimer(String name)
      Create a ReschedulableTimer queue.
      Parameters:
      name - thread name String to assign to this timer (must not be null or empty)
  • Method Details

    • run

      public final void run()
      Execute the timer tasks queued to this timer.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • shutdown

      public void shutdown()
      Stop this timer queue and release all of its resources.
    • finalize

      protected void finalize() throws Throwable
      Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.
      Overrides:
      finalize in class Object
      Throws:
      Throwable - the Exception raised by this method