@NonNullApi @NonNullFields public class ExecutorServiceMetrics extends Object implements MeterBinder
ExecutorService,
as this requires the instance to be wrapped. Timings are provided separately by wrapping the executor service
with TimedExecutorService.| Constructor and Description |
|---|
ExecutorServiceMetrics(ExecutorService executorService,
String executorServiceName,
Iterable<Tag> tags) |
| Modifier and Type | Method and Description |
|---|---|
void |
bindTo(MeterRegistry registry) |
static ExecutorService |
monitor(MeterRegistry registry,
ExecutorService executor,
String executorServiceName,
Iterable<Tag> tags)
Record metrics on the use of an
ExecutorService. |
static ExecutorService |
monitor(MeterRegistry registry,
ExecutorService executor,
String executorServiceName,
Tag... tags)
Record metrics on the use of an
ExecutorService. |
static Executor |
monitor(MeterRegistry registry,
Executor executor,
String executorName,
Iterable<Tag> tags)
Record metrics on the use of an
Executor. |
static Executor |
monitor(MeterRegistry registry,
Executor executor,
String executorName,
Tag... tags)
Record metrics on the use of an
Executor. |
static ScheduledExecutorService |
monitor(MeterRegistry registry,
ScheduledExecutorService executor,
String executorServiceName,
Iterable<Tag> tags)
Record metrics on the use of a
ScheduledExecutorService. |
static ScheduledExecutorService |
monitor(MeterRegistry registry,
ScheduledExecutorService executor,
String executorServiceName,
Tag... tags)
Record metrics on the use of a
ScheduledExecutorService. |
public ExecutorServiceMetrics(@Nullable ExecutorService executorService, String executorServiceName, Iterable<Tag> tags)
public static Executor monitor(MeterRegistry registry, Executor executor, String executorName, Iterable<Tag> tags)
Executor.registry - The registry to bind metrics to.executor - The executor to instrument.executorName - Will be used to tag metrics with "name".tags - Tags to apply to all recorded metrics.public static Executor monitor(MeterRegistry registry, Executor executor, String executorName, Tag... tags)
Executor.registry - The registry to bind metrics to.executor - The executor to instrument.executorName - Will be used to tag metrics with "name".tags - Tags to apply to all recorded metrics.public static ExecutorService monitor(MeterRegistry registry, ExecutorService executor, String executorServiceName, Iterable<Tag> tags)
ExecutorService.registry - The registry to bind metrics to.executor - The executor to instrument.executorServiceName - Will be used to tag metrics with "name".tags - Tags to apply to all recorded metrics.public static ExecutorService monitor(MeterRegistry registry, ExecutorService executor, String executorServiceName, Tag... tags)
ExecutorService.registry - The registry to bind metrics to.executor - The executor to instrument.executorServiceName - Will be used to tag metrics with "name".tags - Tags to apply to all recorded metrics.public static ScheduledExecutorService monitor(MeterRegistry registry, ScheduledExecutorService executor, String executorServiceName, Iterable<Tag> tags)
ScheduledExecutorService.registry - The registry to bind metrics to.executor - The scheduled executor to instrument.executorServiceName - Will be used to tag metrics with "name".tags - Tags to apply to all recorded metrics.public static ScheduledExecutorService monitor(MeterRegistry registry, ScheduledExecutorService executor, String executorServiceName, Tag... tags)
ScheduledExecutorService.registry - The registry to bind metrics to.executor - The scheduled executor to instrument.executorServiceName - Will be used to tag metrics with "name".tags - Tags to apply to all recorded metrics.public void bindTo(MeterRegistry registry)
bindTo in interface MeterBinderCopyright © 2020 LeanCloud. All rights reserved.