类 JmxMetricWriter

  • 所有已实现的接口:
    CounterWriter, GaugeWriter, MetricWriter

    @ManagedResource(description="MetricWriter for pushing metrics to JMX MBeans.")
    public class JmxMetricWriter
    extends Object
    implements MetricWriter
    A MetricWriter for MBeans. Each metric is registered as an individual MBean, so (for instance) it can be graphed and monitored. The object names are provided by an ObjectNamingStrategy, where the default is a DefaultMetricNamingStrategy which provides type, name and value keys by splitting up the metric name on periods.
    从以下版本开始:
    1.3.0
    • 构造器详细资料

      • JmxMetricWriter

        public JmxMetricWriter​(org.springframework.jmx.export.MBeanExporter exporter)
    • 方法详细资料

      • setNamingStrategy

        public void setNamingStrategy​(org.springframework.jmx.export.naming.ObjectNamingStrategy namingStrategy)
      • increment

        @ManagedOperation
        public void increment​(String name,
                              long value)
      • 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

        @ManagedOperation
        public void set​(String name,
                        double value)
      • reset

        @ManagedOperation
        public void reset​(String name)
        从接口复制的说明: 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
        参数:
        name - the name to reset