java.lang.Object
io.helidon.metrics.ExecutorServiceMetricsObserver
- All Implemented Interfaces:
ExecutorServiceSupplierObserver
public class ExecutorServiceMetricsObserver
extends Object
implements ExecutorServiceSupplierObserver
Manages metrics for each Helidon-created thread pool.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.common.configurable.spi.ExecutorServiceSupplierObserver
ExecutorServiceSupplierObserver.MethodInvocation, ExecutorServiceSupplierObserver.SupplierObserverContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionregisterSupplier
(Supplier<? extends ExecutorService> supplier, int supplierIndex, String supplierCategory) Makes a supplier known to the observer and returns a supplier context for the supplier to use for future interactions with the observer.registerSupplier
(Supplier<? extends ExecutorService> supplier, int supplierIndex, String supplierCategory, List<ExecutorServiceSupplierObserver.MethodInvocation> methodInvocations) Makes a supplier known to the observer and returns a supplier context for the supplier to use for future interactions with the observer, using theExecutorServiceSupplierObserver.MethodInvocation
abstraction for invoking methods to obtain metric values.
-
Constructor Details
-
ExecutorServiceMetricsObserver
public ExecutorServiceMetricsObserver()Creates a new instance of the observer.
-
-
Method Details
-
registerSupplier
public ExecutorServiceSupplierObserver.SupplierObserverContext registerSupplier(Supplier<? extends ExecutorService> supplier, int supplierIndex, String supplierCategory) Description copied from interface:ExecutorServiceSupplierObserver
Makes a supplier known to the observer and returns a supplier context for the supplier to use for future interactions with the observer.- Specified by:
registerSupplier
in interfaceExecutorServiceSupplierObserver
- Parameters:
supplier
- the executor service supplier registering with the observersupplierIndex
- unique index across suppliers with the same namesupplierCategory
- supplier category for this supplier- Returns:
- the
SupplierObserverContext
for the supplier
-
registerSupplier
public ExecutorServiceSupplierObserver.SupplierObserverContext registerSupplier(Supplier<? extends ExecutorService> supplier, int supplierIndex, String supplierCategory, List<ExecutorServiceSupplierObserver.MethodInvocation> methodInvocations) Description copied from interface:ExecutorServiceSupplierObserver
Makes a supplier known to the observer and returns a supplier context for the supplier to use for future interactions with the observer, using theExecutorServiceSupplierObserver.MethodInvocation
abstraction for invoking methods to obtain metric values.- Specified by:
registerSupplier
in interfaceExecutorServiceSupplierObserver
- Parameters:
supplier
- the executor service supplier registering with the observersupplierIndex
- unique index across suppliers with the same namesupplierCategory
- the category of supplier registering (e.g., scheduled, server, thread-pool)methodInvocations
- method invocation information for retrieving interesting information from the supplier's executor services- Returns:
- the
SupplierObserverContext
for the supplier
-