Interface DurationCollector
-
- All Superinterfaces:
Collector,MetricCollector,PostConstruct,Serializable
- All Known Implementing Classes:
BagCollector,ChainedDurationCollector,LastTime,NullCollector,PutCounter,SimpleTimerMetric,TimeDelta,TimerCollector
public interface DurationCollector extends Collector
Interface for reporting time durations. It contains helper methods for measuring how long code blocks take to run
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceDurationCollector.TimeCallable<T>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidput(Duration duration)Place a Duration value into the collector to be reported.voidput(Instant time, Duration duration)Place a Duration value and associated timestamp into the collector to be reported.BlockTimertime()<T> Ttime(DurationCollector.TimeCallable<T> callable)<T> TtimeEx(Callable<T> callable)-
Methods inherited from interface org.kairosdb.metrics4j.collectors.MetricCollector
reportMetric, setContextProperties
-
Methods inherited from interface org.kairosdb.metrics4j.PostConstruct
init
-
-
-
-
Method Detail
-
put
void put(Duration duration)
Place a Duration value into the collector to be reported. The actual value reported is determined by the collector implementation that is configured for this source.- Parameters:
duration- Value to be reported.
-
put
void put(Instant time, Duration duration)
Place a Duration value and associated timestamp into the collector to be reported. The actual value and time reported is determined by the collector implementation that is configured for this source.- Parameters:
time- Suggested timestamp to use when reporting.duration- Value to be reported.
-
time
<T> T time(DurationCollector.TimeCallable<T> callable)
-
time
BlockTimer time()
-
-