Package org.glassfish.pfl.tf.timer.spi
Class TimerManager<T>
java.lang.Object
org.glassfish.pfl.tf.timer.spi.TimerManager<T>
Provides access to timer facilities.
This is intended to make it easy to set up timing,
either for performance tests, or for adaptive policy management.
Note that the constructor and the initialize method must be called
from the same thread in order to safely complete the initialization
of an instance of this class. After that, multiple threads may
access this class for the factory(), points(), and controller()
methods.
-
Constructor Summary
ConstructorsConstructorDescriptionTimerManager(String name) TimerManager(ObjectRegistrationManager orm, String name) Create a new TimerManager, with a TimerFactory registered under the given name in the TimerFactoryBuilder, and a TimerEventController with the same name. -
Method Summary
Modifier and TypeMethodDescriptionReturn a TimerController.voiddestroy()Destroy this TimerManager by removing its TimerFactory from the TimerFactoryBuilder.factory()Get the TimerFactory.voidinitialize(T tp) points()Get the timing point utility class of type T.
-
Constructor Details
-
TimerManager
Create a new TimerManager, with a TimerFactory registered under the given name in the TimerFactoryBuilder, and a TimerEventController with the same name. -
TimerManager
-
-
Method Details
-
destroy
public void destroy()Destroy this TimerManager by removing its TimerFactory from the TimerFactoryBuilder. -
initialize
-
points
Get the timing point utility class of type T. -
factory
Get the TimerFactory. -
controller
Return a TimerController. Returns null if called before initialize( T ). -
getTimers
-