public class MessageChannelMetricWriter extends Object implements MetricWriter
MetricWriter that publishes the metric updates on a MessageChannel.
The messages have the writer input (Delta or Metric) as payload, and
carry an additional header "metricName" with the name of the metric in it.MetricWriterMessageHandler| Constructor and Description |
|---|
MessageChannelMetricWriter(MessageChannel channel) |
| Modifier and Type | Method and Description |
|---|---|
void |
increment(Delta<?> delta)
Increment the value of a metric (or decrement if the delta is negative).
|
void |
reset(String metricName)
Reset the value of a metric, usually to zero value.
|
void |
set(Metric<?> value)
Set the value of a metric.
|
public MessageChannelMetricWriter(MessageChannel channel)
public void increment(Delta<?> delta)
MetricWriterincrement in interface MetricWriterdelta - the amount to increment bypublic void set(Metric<?> value)
MetricWriterset in interface MetricWritervalue - the valuepublic void reset(String metricName)
MetricWriterreset in interface MetricWritermetricName - the name to resetCopyright © 2015 Pivotal Software, Inc.. All rights reserved.