Package org.bonitasoft.engine.monitoring
Class DefaultExecutorServiceMetricsProvider
java.lang.Object
org.bonitasoft.engine.monitoring.DefaultExecutorServiceMetricsProvider
- All Implemented Interfaces:
ExecutorServiceMetricsProvider
public class DefaultExecutorServiceMetricsProvider
extends Object
implements ExecutorServiceMetricsProvider
- Author:
- Emmanuel Duchastenier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind(io.micrometer.core.instrument.MeterRegistry meterRegistry, ThreadPoolExecutor executorService, String executorServiceName) bind the executor service to the registry, only support ThreadPool right now, seeExecutorServiceMetricsProvider.unbind(MeterRegistry, String)voidbindMetricsOnly(io.micrometer.core.instrument.MeterRegistry meterRegistry, ThreadPoolExecutor executorService, String executorServiceName) bind the executor service to the registry, only support ThreadPool right now, seeExecutorServiceMetricsProvider.unbind(MeterRegistry, String)This will only bind statisctics of the Threadpool, and not time taks.voidunbind all metrics of the named executor service from the meter registry
-
Constructor Details
-
DefaultExecutorServiceMetricsProvider
public DefaultExecutorServiceMetricsProvider()
-
-
Method Details
-
bind
public ExecutorService bind(io.micrometer.core.instrument.MeterRegistry meterRegistry, ThreadPoolExecutor executorService, String executorServiceName) Description copied from interface:ExecutorServiceMetricsProviderbind the executor service to the registry, only support ThreadPool right now, seeExecutorServiceMetricsProvider.unbind(MeterRegistry, String)- Specified by:
bindin interfaceExecutorServiceMetricsProvider- Returns:
- the monitored executor service with monitoring on execution time
-
bindMetricsOnly
public void bindMetricsOnly(io.micrometer.core.instrument.MeterRegistry meterRegistry, ThreadPoolExecutor executorService, String executorServiceName) Description copied from interface:ExecutorServiceMetricsProviderbind the executor service to the registry, only support ThreadPool right now, seeExecutorServiceMetricsProvider.unbind(MeterRegistry, String)This will only bind statisctics of the Threadpool, and not time taks.- Specified by:
bindMetricsOnlyin interfaceExecutorServiceMetricsProvider
-
unbind
public void unbind(io.micrometer.core.instrument.MeterRegistry meterRegistry, String executorServiceName) Description copied from interface:ExecutorServiceMetricsProviderunbind all metrics of the named executor service from the meter registry- Specified by:
unbindin interfaceExecutorServiceMetricsProvider
-