Package org.glassfish.pfl.tf.timer.spi
Class TimerFactoryBuilder
- java.lang.Object
-
- org.glassfish.pfl.tf.timer.spi.TimerFactoryBuilder
-
public class TimerFactoryBuilder extends java.lang.Object
TimerFactoryBuilder creates independent instances of the TimerFactory interface. Guarantees that all TimerFactory instances have unique names.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.String,TimerFactory>
fmap
-
Constructor Summary
Constructors Constructor Description TimerFactoryBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<TimerFactory>
contents()
Return a list of the TimerFactory instances in this TimerFactoryBuilder.static void
destroy(TimerFactory factory)
Remove a TimerFactory so that it may be collected.static java.lang.String
getTimerName(java.lang.String cname, java.lang.String name)
Construct the standard name for a Timer derived from a method in the tracing facility.static TimerFactory
make(java.lang.String name, java.lang.String description)
static TimerFactory
make(ObjectRegistrationManager orm, java.lang.String name, java.lang.String description)
Create a new TimerFactory.
-
-
-
Field Detail
-
fmap
private static java.util.Map<java.lang.String,TimerFactory> fmap
-
-
Method Detail
-
getTimerName
public static java.lang.String getTimerName(java.lang.String cname, java.lang.String name)
Construct the standard name for a Timer derived from a method in the tracing facility.- Parameters:
cname
- The name of the monitored clasname
- The name of a monitored method or info method- Returns:
- The timer name
-
make
public static TimerFactory make(java.lang.String name, java.lang.String description)
-
make
public static TimerFactory make(ObjectRegistrationManager orm, java.lang.String name, java.lang.String description)
Create a new TimerFactory. No two TimerFactory instances can have the same name.
-
destroy
public static void destroy(TimerFactory factory)
Remove a TimerFactory so that it may be collected.
-
contents
public static java.util.List<TimerFactory> contents()
Return a list of the TimerFactory instances in this TimerFactoryBuilder. The list represents the state of the instances at the time this method is called; any susbsequent make/destroy calls do NOT affect this list.
-
-