Package org.epics.pvdata.misc
Class TimerFactory
- java.lang.Object
-
- org.epics.pvdata.misc.TimerFactory
-
public class TimerFactory extends Object
Factory that creates a Timer. This implementation of a Timer provides the following features not provided by java.util.Timer 1) Timer thread has a priority and 2) A TimerNode can be reused.- Author:
- mrk
-
-
Constructor Summary
Constructors Constructor Description TimerFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Timercreate(String threadName, ThreadPriority priority)Create and return a Timer.static Timer.TimerNodecreateNode(Timer.TimerCallback timerCallback)Create a TimerNode that can be passed to the schedule methods.
-
-
-
Method Detail
-
create
public static Timer create(String threadName, ThreadPriority priority)
Create and return a Timer.- Parameters:
threadName- the thread name for the timer threadpriority- the priority for the timer thread- Returns:
- the new timer
-
createNode
public static Timer.TimerNode createNode(Timer.TimerCallback timerCallback)
Create a TimerNode that can be passed to the schedule methods.- Parameters:
timerCallback- the callbacks called when the timer expires or is stopped- Returns:
- the TimerNode created
-
-