Interface MetricDescriptor<T>
- Type Parameters:
T- type of metric
public interface MetricDescriptor<T>
Describes a particular metric that is derived from a Status History
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intUsed during creation of metric instance withMetricDescriptor.Formatter.FRACTIONformatting. -
Method Summary
-
Field Details
-
FRACTION_MULTIPLIER
static final int FRACTION_MULTIPLIERUsed during creation of metric instance withMetricDescriptor.Formatter.FRACTIONformatting. 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
MetricDescriptor.Formatter 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
ValueMapperthat can be used to extract a value for the status history
-
getValueReducer
ValueReducer<StatusSnapshot,Long> getValueReducer()- Returns:
- a
ValueReducerthat can reduce multiple StatusSnapshots into a single Long value
-
isCounter
boolean isCounter()- Returns:
trueif the metric is for a component Counter,falseotherwise
-