Class ChainedDurationCollector
- java.lang.Object
-
- org.kairosdb.metrics4j.collectors.helpers.Cloneable
-
- org.kairosdb.metrics4j.collectors.helpers.ChainedCollector<DurationCollector>
-
- org.kairosdb.metrics4j.collectors.impl.ChainedDurationCollector
-
- All Implemented Interfaces:
Serializable,Cloneable,Collector,DurationCollector,MetricCollector,PostConstruct
public class ChainedDurationCollector extends ChainedCollector<DurationCollector> implements DurationCollector
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.kairosdb.metrics4j.collectors.helpers.ChainedCollector
ChainedCollector.PrefixMetricReporter<C extends Collector>
-
Nested classes/interfaces inherited from interface org.kairosdb.metrics4j.collectors.DurationCollector
DurationCollector.TimeCallable<T>
-
-
Field Summary
-
Fields inherited from class org.kairosdb.metrics4j.collectors.helpers.ChainedCollector
collectors, m_chainedCollectors, prefixes
-
-
Constructor Summary
Constructors Constructor Description ChainedDurationCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collectorclone()The first instance of a collector is unmarshalled from configuration using hocon, all other instances are cloned from that first one so the clone method should pass along any configuration that was set.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)DurationCollectorvalidateCollector(Collector collector)-
Methods inherited from class org.kairosdb.metrics4j.collectors.helpers.ChainedCollector
init, reportMetric, setContextProperties
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.kairosdb.metrics4j.collectors.MetricCollector
reportMetric, setContextProperties
-
Methods inherited from interface org.kairosdb.metrics4j.PostConstruct
init
-
-
-
-
Method Detail
-
put
public void put(Duration duration)
Description copied from interface:DurationCollectorPlace 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.- Specified by:
putin interfaceDurationCollector- Parameters:
duration- Value to be reported.
-
put
public void put(Instant time, Duration duration)
Description copied from interface:DurationCollectorPlace 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.- Specified by:
putin interfaceDurationCollector- Parameters:
time- Suggested timestamp to use when reporting.duration- Value to be reported.
-
clone
public Collector clone()
Description copied from interface:CollectorThe first instance of a collector is unmarshalled from configuration using hocon, all other instances are cloned from that first one so the clone method should pass along any configuration that was set.- Specified by:
clonein interfaceCollector- Overrides:
clonein classChainedCollector<DurationCollector>- Returns:
- Clone of this collector
-
timeEx
public <T> T timeEx(Callable<T> callable) throws Exception
- Specified by:
timeExin interfaceDurationCollector- Throws:
Exception
-
time
public <T> T time(DurationCollector.TimeCallable<T> callable)
- Specified by:
timein interfaceDurationCollector
-
time
public BlockTimer time()
- Specified by:
timein interfaceDurationCollector
-
validateCollector
public DurationCollector validateCollector(Collector collector)
- Specified by:
validateCollectorin classChainedCollector<DurationCollector>
-
-