Top Description Fields Constructors Methods
org.glassfish.pfl.tf.timer.spi

public Class TimerFactoryBuilder

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collection, .HashMap, .List, .Map, org.glassfish.pfl.tf.timer.impl.TimerFactoryImpl

TimerFactoryBuilder creates independent instances of the TimerFactory interface. Guarantees that all TimerFactory instances have unique names.

Field Summary

Modifier and TypeField and Description
private static Map<String, TimerFactory>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static synchronized List<TimerFactory>
contents()

Return a list of the TimerFactory instances in this TimerFactoryBuilder.

public static synchronized void
destroy(TimerFactory factory)

Remove a TimerFactory so that it may be collected.

public static String

Returns:

The timer name
getTimerName
(final String
The name of the monitored clas
cname
,
final String
The name of a monitored method or info method
name
)

Construct the standard name for a Timer derived from a method in the tracing facility.

public static synchronized TimerFactory
make(String name, String description)

public static synchronized TimerFactory
make(ObjectRegistrationManager orm, String name, String description)

Create a new TimerFactory.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fmapback to summary
private static Map<String, TimerFactory> fmap

Constructor Detail

TimerFactoryBuilderback to summary
public TimerFactoryBuilder()

Method Detail

contentsback to summary
public static synchronized 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.

destroyback to summary
public static synchronized void destroy(TimerFactory factory)

Remove a TimerFactory so that it may be collected.

getTimerNameback to summary
public static String getTimerName(final String cname, final String name)

Construct the standard name for a Timer derived from a method in the tracing facility.

Parameters
cname:String

The name of the monitored clas

name:String

The name of a monitored method or info method

Returns:String

The timer name

makeback to summary
public static synchronized TimerFactory make(String name, String description)
makeback to summary
public static synchronized TimerFactory make(ObjectRegistrationManager orm, String name, String description)

Create a new TimerFactory. No two TimerFactory instances can have the same name.