org.glassfish.pfl.tf.timer.spi
Class TimerFactoryBuilder

java.lang.Object
  extended by org.glassfish.pfl.tf.timer.spi.TimerFactoryBuilder

public class TimerFactoryBuilder
extends Object

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


Constructor Summary
TimerFactoryBuilder()
           
 
Method Summary
static 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 String getTimerName(String cname, String name)
          Construct the standard name for a Timer derived from a method in the tracing facility.
static TimerFactory make(ObjectRegistrationManager orm, String name, String description)
          Create a new TimerFactory.
static TimerFactory make(String name, String description)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimerFactoryBuilder

public TimerFactoryBuilder()
Method Detail

getTimerName

public static String getTimerName(String cname,
                                  String name)
Construct the standard name for a Timer derived from a method in the tracing facility.

Parameters:
cname - The name of the monitored clas
name - The name of a monitored method or info method
Returns:
The timer name

make

public static TimerFactory make(String name,
                                String description)

make

public static TimerFactory make(ObjectRegistrationManager orm,
                                String name,
                                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 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.



Copyright © 2013 Oracle. All Rights Reserved.