Interface Limit.InitializationContext
- Enclosing interface:
Limit
public static interface Limit.InitializationContext
Runtime context used when initializing a
Limit.-
Method Summary
Modifier and TypeMethodDescriptionstatic Limit.InitializationContextCreate a limit context with no metric tags.static Limit.InitializationContextCreate a limit context with metric tags.static Limit.InitializationContextCreate a limit context with metric tags and a meter registry supplier.default Optional<MeterRegistry> Meter registry to use when registering limit metrics.Metric tags to use when registering limit metrics.Origin name of the work protected by the limit.
-
Method Details
-
create
Create a limit context with no metric tags.- Parameters:
originName- origin name of the work protected by the limit- Returns:
- a new limit context
-
create
Create a limit context with metric tags.- Parameters:
originName- origin name of the work protected by the limitmetricTags- metric tags to use when registering limit metrics- Returns:
- a new limit context
-
create
static Limit.InitializationContext create(String originName, List<Tag> metricTags, Supplier<MeterRegistry> meterRegistry) Create a limit context with metric tags and a meter registry supplier.- Parameters:
originName- origin name of the work protected by the limitmetricTags- metric tags to use when registering limit metricsmeterRegistry- meter registry supplier to use when metrics are enabled- Returns:
- a new limit context
-
originName
-
metricTags
-
meterRegistry
Meter registry to use when registering limit metrics.- Returns:
- meter registry to use, if explicitly supplied
-