类 InMemoryMetricRepository

    • 方法详细资料

      • 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
      • count

        public long count()
        从接口复制的说明: MetricReader
        The number of metrics known to this reader.
        指定者:
        count 在接口中 MetricReader
        返回:
        the number of metrics
      • 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
      • findOne

        public Metric<?> findOne​(String metricName)
        从接口复制的说明: MetricReader
        Find an instance of the metric with the given name (usually the latest recorded value).
        指定者:
        findOne 在接口中 MetricReader
        参数:
        metricName - the name of the metric to find
        返回:
        a metric value or null if there are none with that name