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, long tenantId) bind the executor service to the registry, only support ThreadPool right now, seeunbind(MeterRegistry, String, long)voidbindMetricsOnly(io.micrometer.core.instrument.MeterRegistry meterRegistry, ThreadPoolExecutor executorService, String executorServiceName, long tenantId) bind the executor service to the registry, only support ThreadPool right now, seeunbind(MeterRegistry, String, long)This will only bind statisctics of the Threadpool, and not time taks.voidunbind(io.micrometer.core.instrument.MeterRegistry meterRegistry, String executorServiceName, long tenantId) unbind 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, long tenantId) Description copied from interface:ExecutorServiceMetricsProviderbind the executor service to the registry, only support ThreadPool right now, seeunbind(MeterRegistry, String, long)- 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, long tenantId) Description copied from interface:ExecutorServiceMetricsProviderbind the executor service to the registry, only support ThreadPool right now, seeunbind(MeterRegistry, String, long)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, long tenantId) Description copied from interface:ExecutorServiceMetricsProviderunbind all metrics of the named executor service from the meter registry- Specified by:
unbindin interfaceExecutorServiceMetricsProvider
-