Class StringReporter
- java.lang.Object
-
- org.kairosdb.metrics4j.collectors.impl.StringReporter
-
- All Implemented Interfaces:
Serializable,Collector,MetricCollector,StringCollector,PostConstruct
public class StringReporter extends Object implements StringCollector
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StringReporter()
-
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.voidinit(MetricsContext context)voidput(String value)Place a String value into the collector to be reported.voidput(Instant time, String value)Place a double value and associated timestamp into the collector to be reported.voidreportMetric(MetricReporter metricReporter)voidsetContextProperties(Map<String,String> contextProperties)
-
-
-
Method Detail
-
put
public void put(String value)
Description copied from interface:StringCollectorPlace a String 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 interfaceStringCollector- Parameters:
value- Value to be reported.
-
put
public void put(Instant time, String value)
Description copied from interface:StringCollectorPlace a double 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 interfaceStringCollector- Parameters:
time- Suggested timestamp to use when reporting.value- 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.
-
init
public void init(MetricsContext context)
- Specified by:
initin interfacePostConstruct
-
reportMetric
public void reportMetric(MetricReporter metricReporter)
- Specified by:
reportMetricin interfaceMetricCollector
-
setContextProperties
public void setContextProperties(Map<String,String> contextProperties)
- Specified by:
setContextPropertiesin interfaceMetricCollector
-
-