Package software.amazon.awssdk.metrics
Interface SdkMetric<T>
-
- Type Parameters:
T
- The type for values of this metric.
- All Known Implementing Classes:
DefaultSdkMetric
public interface SdkMetric<T>
A specific SDK metric.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<MetricCategory>
categories()
static <T> SdkMetric<T>
create(String name, Class<T> clzz, MetricLevel level, Set<MetricCategory> categories)
Create a new metric.static <T> SdkMetric<T>
create(String name, Class<T> clzz, MetricLevel level, MetricCategory c1, MetricCategory... cn)
Create a new metric.MetricLevel
level()
String
name()
Class<T>
valueClass()
-
-
-
Method Detail
-
name
String name()
- Returns:
- The name of this metric.
-
categories
Set<MetricCategory> categories()
- Returns:
- The categories of this metric.
-
level
MetricLevel level()
- Returns:
- The level of this metric.
-
create
static <T> SdkMetric<T> create(String name, Class<T> clzz, MetricLevel level, MetricCategory c1, MetricCategory... cn)
Create a new metric.- Type Parameters:
T
- The type of the object containing the associated value for this metric.- Parameters:
name
- The name of this metric.clzz
- The class of the object containing the associated value for this metric.c1
- A category associated with this metric.cn
- Additional categories associated with this metric.- Returns:
- The created metric.
- Throws:
IllegalArgumentException
- If a metric of the same name has already been created.
-
create
static <T> SdkMetric<T> create(String name, Class<T> clzz, MetricLevel level, Set<MetricCategory> categories)
Create a new metric.- Type Parameters:
T
- The type of the object containing the associated value for this metric.- Parameters:
name
- The name of this metric.clzz
- The class of the object containing the associated value for this metric.categories
- The categories associated with this metric.- Returns:
- The created metric.
- Throws:
IllegalArgumentException
- If a metric of the same name has already been created.
-
-