类 CompositeMetricWriter
- java.lang.Object
- org.springframework.boot.actuate.metrics.writer.CompositeMetricWriter
- 所有已实现的接口:
Iterable<MetricWriter>
,CounterWriter
,GaugeWriter
,MetricWriter
public class CompositeMetricWriter extends Object implements MetricWriter, Iterable<MetricWriter>
Composite implementation ofMetricWriter
that just sends its input to all of the delegates that have been registered.
构造器概要
构造器 构造器 说明 CompositeMetricWriter(List<MetricWriter> writers)
CompositeMetricWriter(MetricWriter... writers)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 java.lang.Iterable
forEach, spliterator
构造器详细资料
CompositeMetricWriter
public CompositeMetricWriter(MetricWriter... writers)
CompositeMetricWriter
public CompositeMetricWriter(List<MetricWriter> writers)
方法详细资料
iterator
public Iterator<MetricWriter> iterator()
- 指定者:
iterator
在接口中Iterable<MetricWriter>
increment
public void increment(Delta<?> delta)
从接口复制的说明:CounterWriter
Increment the value of a metric (or decrement if the delta is negative). The name of the delta is the name of the metric to increment.- 指定者:
increment
在接口中CounterWriter
- 参数:
delta
- the amount to increment by
set
public void set(Metric<?> value)
从接口复制的说明:GaugeWriter
Set the value of a metric.- 指定者:
set
在接口中GaugeWriter
- 参数:
value
- the value
reset
public void reset(String metricName)
从接口复制的说明:CounterWriter
Reset the value of a metric, usually to zero value. Implementations can discard the old values if desired, but may choose not to. This operation is optional (some implementations may not be able to fulfill the contract, in which case they should simply do nothing).- 指定者:
reset
在接口中CounterWriter
- 参数:
metricName
- the name to reset