org.qi4j.spi.metrics
Class NullMetricsFactory.NullTimerFactory

java.lang.Object
  extended by org.qi4j.spi.metrics.NullMetricsFactory.NullTimerFactory
All Implemented Interfaces:
MetricsFactory, MetricsTimerFactory
Enclosing class:
NullMetricsFactory

public static class NullMetricsFactory.NullTimerFactory
extends java.lang.Object
implements MetricsTimerFactory


Constructor Summary
NullMetricsFactory.NullTimerFactory()
           
 
Method Summary
 MetricsTimer createTimer(java.lang.Class<?> origin, java.lang.String name, java.util.concurrent.TimeUnit duration, java.util.concurrent.TimeUnit rate)
          Create a MetricsTimer instance.
 java.lang.Iterable<Metric> registered()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullMetricsFactory.NullTimerFactory

public NullMetricsFactory.NullTimerFactory()
Method Detail

createTimer

public MetricsTimer createTimer(java.lang.Class<?> origin,
                                java.lang.String name,
                                java.util.concurrent.TimeUnit duration,
                                java.util.concurrent.TimeUnit rate)
Description copied from interface: MetricsTimerFactory
Create a MetricsTimer instance. If the same arguments are given twice, the same instance must be returned.

Specified by:
createTimer in interface MetricsTimerFactory
Parameters:
origin - The class that instantiate the metric
name - A human readable, short name of the metric.
duration - the scale unit for this timer's duration metrics
rate - the scale unit for this timer's rate metrics
Returns:
A Metric instance to be used, OR org.qi4j.spi.metrics.DefaultMetric.NULL if not supported.
See Also:
DefaultMetric

registered

public java.lang.Iterable<Metric> registered()
Specified by:
registered in interface MetricsFactory