Package org.eclipse.microprofile.fault.tolerance.tck.telemetryMetrics.util

# Enum TelemetryMetricDefinition

java.lang.Object
java.lang.Enum<TelemetryMetricDefinition>
org.eclipse.microprofile.fault.tolerance.tck.telemetryMetrics.util.TelemetryMetricDefinition

All Implemented Interfaces:
  `Serializable`, `Comparable<TelemetryMetricDefinition>`

public enum TelemetryMetricDefinition extends Enum<TelemetryMetricDefinition>
Enum containing a definition for each metric defined in the spec.

All tests should not use this enum directly, but should use `TelemetryMetricGetter` to access metric values. However, if we add new metrics to the spec, their definitions should be added here. Having a defined list of all metrics allows us to easily iterate through them for stuff like `TelemetryMetricGetter.baselineMetrics()`.

Each metric definition has a name, a type and a set of tags.

Each fault tolerance metric is assumed to have a `method` tag, so the set of tags does not include a method tag.

Each tag in the set is represented by an enum which implements `TelemetryMetricDefinition.AttributeValue`. Each enum has one entry for each valid value for that tag.

For example, the metric `ft.bulkhead.calls.total` has one tag, `bulkheadResult` which can have the value `accepted` or `rejected`. The value for this is `BULKHEAD_CALLS` and calling `BULKHEAD_CALLS.getArgumentClasses()` returns `TelemetryMetricDefinition.BulkheadResult`, which is an enum with two entries, `TelemetryMetricDefinition.BulkheadResult.ACCEPTED` and `TelemetryMetricDefinition.BulkheadResult.REJECTED`.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static interface`
`TelemetryMetricDefinition.AttributeValue`
`static enum`
`TelemetryMetricDefinition.BulkheadResult`
`static enum`
`TelemetryMetricDefinition.CircuitBreakerResult`
`static enum`
`TelemetryMetricDefinition.CircuitBreakerState`
`static enum`
`TelemetryMetricDefinition.InvocationFallback`
`static enum`
`TelemetryMetricDefinition.InvocationResult`
`static enum`
`TelemetryMetricDefinition.MetricType`
`static enum`
`TelemetryMetricDefinition.RetryResult`
`static enum`
`TelemetryMetricDefinition.RetryRetried`
`static enum`
`TelemetryMetricDefinition.TimeoutTimedOut`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`BULKHEAD_CALLS`
`BULKHEAD_EXECUTIONS_RUNNING`
`BULKHEAD_EXECUTIONS_WAITING`
`BULKHEAD_RUNNING_DURATION`
`BULKHEAD_WAITING_DURATION`
`CIRCUITBREAKER_CALLS`
`CIRCUITBREAKER_OPENED`
`CIRCUITBREAKER_STATE`
`INVOCATIONS`
`RETRY_CALLS`
`RETRY_RETRIES`
`TIMEOUT_CALLS`
`TIMEOUT_EXECUTION_DURATION`

## Method Summary

Modifier and Type
Method
Description
`Class<? extends TelemetryMetricDefinition.AttributeValue>[]`
`getAttributeClasses()`
The tags which are applied to this metric
`TelemetryMetricDefinition.MetricType`
`getMetricType()`
The type of this metric
`String`
`getName()`
The metric name
`String`
`getUnit()`
The metric unit
`static TelemetryMetricDefinition`
`valueOf(String name)`
Returns the enum constant of this type with the specified name.
`static TelemetryMetricDefinition[]`
`values()`
Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### INVOCATIONS

public static final TelemetryMetricDefinition INVOCATIONS

### RETRY_CALLS

public static final TelemetryMetricDefinition RETRY_CALLS

### RETRY_RETRIES

public static final TelemetryMetricDefinition RETRY_RETRIES

### TIMEOUT_CALLS

public static final TelemetryMetricDefinition TIMEOUT_CALLS

### TIMEOUT_EXECUTION_DURATION

public static final TelemetryMetricDefinition TIMEOUT_EXECUTION_DURATION

### CIRCUITBREAKER_CALLS

public static final TelemetryMetricDefinition CIRCUITBREAKER_CALLS

### CIRCUITBREAKER_STATE

public static final TelemetryMetricDefinition CIRCUITBREAKER_STATE

### CIRCUITBREAKER_OPENED

public static final TelemetryMetricDefinition CIRCUITBREAKER_OPENED

### BULKHEAD_CALLS

public static final TelemetryMetricDefinition BULKHEAD_CALLS

### BULKHEAD_EXECUTIONS_RUNNING

public static final TelemetryMetricDefinition BULKHEAD_EXECUTIONS_RUNNING

### BULKHEAD_EXECUTIONS_WAITING

public static final TelemetryMetricDefinition BULKHEAD_EXECUTIONS_WAITING

### BULKHEAD_RUNNING_DURATION

public static final TelemetryMetricDefinition BULKHEAD_RUNNING_DURATION

### BULKHEAD_WAITING_DURATION

public static final TelemetryMetricDefinition BULKHEAD_WAITING_DURATION

## Method Details

### values

public static TelemetryMetricDefinition[] values()
Returns an array containing the constants of this enum type, in the order they are declared.

Returns:
  an array containing the constants of this enum type, in the order they are declared

### valueOf

public static TelemetryMetricDefinition valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null

### getName

public String getName()
The metric name

Returns:
  the name

### getUnit

public String getUnit()
The metric unit

Returns:
  the unit

### getMetricType

public TelemetryMetricDefinition.MetricType getMetricType()
The type of this metric

Returns:
  the metric type

### getAttributeClasses

public Class<? extends TelemetryMetricDefinition.AttributeValue>[] getAttributeClasses()
The tags which are applied to this metric

The classes returned from this method will be enums which implement `TelemetryMetricDefinition.AttributeValue`

Returns:
  the tags which are applied to this metric