org.qi4j.api.metrics
Interface MetricsTimerFactory

All Superinterfaces:
MetricsFactory
All Known Implementing Classes:
NullMetricsFactory.NullTimerFactory

public interface MetricsTimerFactory
extends MetricsFactory

Create MetricsTimer instances.


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.
 
Methods inherited from interface org.qi4j.api.metrics.MetricsFactory
registered
 

Method Detail

createTimer

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

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