Package org.apache.solr.metrics
Class DelegateRegistryTimer
- java.lang.Object
-
- com.codahale.metrics.Timer
-
- org.apache.solr.metrics.DelegateRegistryTimer
-
- All Implemented Interfaces:
com.codahale.metrics.Counting
,com.codahale.metrics.Metered
,com.codahale.metrics.Metric
,com.codahale.metrics.Sampling
public class DelegateRegistryTimer extends com.codahale.metrics.Timer
A timer implementation that is aware of both primary and delegate metrics belonging to different registries and able to update metrics in multiple registries- See Also:
SolrDelegateRegistryMetricsContext
-
-
Constructor Summary
Constructors Constructor Description DelegateRegistryTimer(com.codahale.metrics.Clock clock, com.codahale.metrics.Timer primaryTimer, com.codahale.metrics.Timer delegateTimer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getCount()
com.codahale.metrics.Timer
getDelegateTimer()
double
getFifteenMinuteRate()
double
getFiveMinuteRate()
double
getMeanRate()
double
getOneMinuteRate()
com.codahale.metrics.Timer
getPrimaryTimer()
com.codahale.metrics.Snapshot
getSnapshot()
com.codahale.metrics.Timer.Context
time()
void
time(Runnable event)
<T> T
time(Callable<T> event)
<T> T
timeSupplier(Supplier<T> event)
void
update(long duration, TimeUnit unit)
void
update(Duration duration)
-
-
-
Method Detail
-
update
public void update(long duration, TimeUnit unit)
- Overrides:
update
in classcom.codahale.metrics.Timer
-
update
public void update(Duration duration)
- Overrides:
update
in classcom.codahale.metrics.Timer
-
time
public <T> T time(Callable<T> event) throws Exception
- Overrides:
time
in classcom.codahale.metrics.Timer
- Throws:
Exception
-
timeSupplier
public <T> T timeSupplier(Supplier<T> event)
- Overrides:
timeSupplier
in classcom.codahale.metrics.Timer
-
time
public void time(Runnable event)
- Overrides:
time
in classcom.codahale.metrics.Timer
-
time
public com.codahale.metrics.Timer.Context time()
- Overrides:
time
in classcom.codahale.metrics.Timer
-
getCount
public long getCount()
- Specified by:
getCount
in interfacecom.codahale.metrics.Counting
- Specified by:
getCount
in interfacecom.codahale.metrics.Metered
- Overrides:
getCount
in classcom.codahale.metrics.Timer
-
getFifteenMinuteRate
public double getFifteenMinuteRate()
- Specified by:
getFifteenMinuteRate
in interfacecom.codahale.metrics.Metered
- Overrides:
getFifteenMinuteRate
in classcom.codahale.metrics.Timer
-
getFiveMinuteRate
public double getFiveMinuteRate()
- Specified by:
getFiveMinuteRate
in interfacecom.codahale.metrics.Metered
- Overrides:
getFiveMinuteRate
in classcom.codahale.metrics.Timer
-
getMeanRate
public double getMeanRate()
- Specified by:
getMeanRate
in interfacecom.codahale.metrics.Metered
- Overrides:
getMeanRate
in classcom.codahale.metrics.Timer
-
getOneMinuteRate
public double getOneMinuteRate()
- Specified by:
getOneMinuteRate
in interfacecom.codahale.metrics.Metered
- Overrides:
getOneMinuteRate
in classcom.codahale.metrics.Timer
-
getSnapshot
public com.codahale.metrics.Snapshot getSnapshot()
- Specified by:
getSnapshot
in interfacecom.codahale.metrics.Sampling
- Overrides:
getSnapshot
in classcom.codahale.metrics.Timer
-
getPrimaryTimer
public com.codahale.metrics.Timer getPrimaryTimer()
-
getDelegateTimer
public com.codahale.metrics.Timer getDelegateTimer()
-
-