Interface MetricDescriptor<T>

Type Parameters:
T - type of metric

public interface MetricDescriptor<T>
Describes a particular metric that is derived from a Status History
  • Field Details

    • FRACTION_MULTIPLIER

      static final int FRACTION_MULTIPLIER
      Used during creation of metric instance with MetricDescriptor.Formatter.FRACTION formatting. The expected way is to multiply the floating point metric value with it before converting into long. By this, enough of the fractional part might be kept for visualisation. In order to show the correct number the result must be divided with the same number before presenting.
      See Also:
  • Method Details

    • getMetricIdentifier

      int getMetricIdentifier()
    • getFormatter

      Specifies how the values should be formatted
      Returns:
      formatter for values
    • getDescription

      String getDescription()
      Returns:
      a human-readable description of the field
    • getLabel

      String getLabel()
      Returns:
      a human-readable label for the field
    • getField

      String getField()
      Returns:
      the name of a field
    • getValueFunction

      ValueMapper<T> getValueFunction()
      Returns:
      a ValueMapper that can be used to extract a value for the status history
    • getValueReducer

      ValueReducer<StatusSnapshot,Long> getValueReducer()
      Returns:
      a ValueReducer that can reduce multiple StatusSnapshots into a single Long value
    • isCounter

      boolean isCounter()
      Returns:
      true if the metric is for a component Counter, false otherwise