public class CompositeMetricWriter extends Object implements MetricWriter, Iterable<MetricWriter>
MetricWriter
that just sends its input to all of
the delegates that have been registered.Constructor and Description |
---|
CompositeMetricWriter(List<MetricWriter> writers) |
CompositeMetricWriter(MetricWriter... writers) |
Modifier and Type | Method and Description |
---|---|
void |
increment(Delta<?> delta)
Increment the value of a metric (or decrement if the delta is negative).
|
Iterator<MetricWriter> |
iterator() |
void |
reset(String metricName)
Reset the value of a metric, usually to zero value.
|
void |
set(Metric<?> value)
Set the value of a metric.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public CompositeMetricWriter(MetricWriter... writers)
public CompositeMetricWriter(List<MetricWriter> writers)
public Iterator<MetricWriter> iterator()
iterator
in interface Iterable<MetricWriter>
public void increment(Delta<?> delta)
CounterWriter
increment
in interface CounterWriter
delta
- the amount to increment bypublic void set(Metric<?> value)
GaugeWriter
set
in interface GaugeWriter
value
- the valuepublic void reset(String metricName)
CounterWriter
reset
in interface CounterWriter
metricName
- the name to resetCopyright © 2015 Pivotal Software, Inc.. All rights reserved.