Class ThreadPoolBulkheadMetrics
java.lang.Object
io.github.resilience4j.metrics.ThreadPoolBulkheadMetrics
- All Implemented Interfaces:
com.codahale.metrics.Metric, com.codahale.metrics.MetricSet
An adapter which exports
Bulkhead.Metrics as Dropwizard Metrics Gauges.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.codahale.metrics.MetricRegistry -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateThreadPoolBulkheadMetrics(Iterable<io.github.resilience4j.bulkhead.ThreadPoolBulkhead> bulkheads) privateThreadPoolBulkheadMetrics(String prefix, Iterable<io.github.resilience4j.bulkhead.ThreadPoolBulkhead> bulkheads, com.codahale.metrics.MetricRegistry metricRegistry) -
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadPoolBulkheadMetricsofBulkhead(io.github.resilience4j.bulkhead.ThreadPoolBulkhead bulkhead) Creates a new instance of BulkheadMetricsThreadPoolBulkheadMetricswith a bulkhead as a source.static ThreadPoolBulkheadMetricsofBulkheadRegistry(io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith aBulkheadRegistryas a source.static ThreadPoolBulkheadMetricsofBulkheadRegistry(io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry, com.codahale.metrics.MetricRegistry metricRegistry) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith aBulkheadRegistryas a source.static ThreadPoolBulkheadMetricsofBulkheadRegistry(String prefix, io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith specified metrics names prefix and aBulkheadRegistryas a source.static ThreadPoolBulkheadMetricsofBulkheadRegistry(String prefix, io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry, com.codahale.metrics.MetricRegistry metricRegistry) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith specified metrics names prefix and aBulkheadRegistryas a source.static ThreadPoolBulkheadMetricsofIterable(Iterable<io.github.resilience4j.bulkhead.ThreadPoolBulkhead> bulkheads) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith anIterableof bulkheads as a source.static ThreadPoolBulkheadMetricsofIterable(String prefix, Iterable<io.github.resilience4j.bulkhead.ThreadPoolBulkhead> bulkheads) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith anIterableof bulkheads as a source.
-
Field Details
-
metricRegistry
private final com.codahale.metrics.MetricRegistry metricRegistry
-
-
Constructor Details
-
ThreadPoolBulkheadMetrics
private ThreadPoolBulkheadMetrics(Iterable<io.github.resilience4j.bulkhead.ThreadPoolBulkhead> bulkheads) -
ThreadPoolBulkheadMetrics
-
-
Method Details
-
ofBulkheadRegistry
public static ThreadPoolBulkheadMetrics ofBulkheadRegistry(String prefix, io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry, com.codahale.metrics.MetricRegistry metricRegistry) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith specified metrics names prefix and aBulkheadRegistryas a source.- Parameters:
prefix- the prefix of metrics namesbulkheadRegistry- the registry of bulkheadsmetricRegistry- the metric registry
-
ofBulkheadRegistry
public static ThreadPoolBulkheadMetrics ofBulkheadRegistry(String prefix, io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith specified metrics names prefix and aBulkheadRegistryas a source.- Parameters:
prefix- the prefix of metrics namesbulkheadRegistry- the registry of bulkheads
-
ofBulkheadRegistry
public static ThreadPoolBulkheadMetrics ofBulkheadRegistry(io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry, com.codahale.metrics.MetricRegistry metricRegistry) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith aBulkheadRegistryas a source.- Parameters:
bulkheadRegistry- the registry of bulkheads
-
ofBulkheadRegistry
public static ThreadPoolBulkheadMetrics ofBulkheadRegistry(io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith aBulkheadRegistryas a source.- Parameters:
bulkheadRegistry- the registry of bulkheads
-
ofIterable
public static ThreadPoolBulkheadMetrics ofIterable(Iterable<io.github.resilience4j.bulkhead.ThreadPoolBulkhead> bulkheads) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith anIterableof bulkheads as a source.- Parameters:
bulkheads- the bulkheads
-
ofIterable
public static ThreadPoolBulkheadMetrics ofIterable(String prefix, Iterable<io.github.resilience4j.bulkhead.ThreadPoolBulkhead> bulkheads) Creates a new instance BulkheadMetricsThreadPoolBulkheadMetricswith anIterableof bulkheads as a source.- Parameters:
bulkheads- the bulkheads
-
ofBulkhead
public static ThreadPoolBulkheadMetrics ofBulkhead(io.github.resilience4j.bulkhead.ThreadPoolBulkhead bulkhead) Creates a new instance of BulkheadMetricsThreadPoolBulkheadMetricswith a bulkhead as a source.- Parameters:
bulkhead- the circuit breaker
-
getMetrics
-