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
Constructors -
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.MethodInvocationabstraction 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:ExecutorServiceSupplierObserverMakes a supplier known to the observer and returns a supplier context for the supplier to use for future interactions with the observer.- Specified by:
registerSupplierin 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
SupplierObserverContextfor the supplier
-
registerSupplier
public ExecutorServiceSupplierObserver.SupplierObserverContext registerSupplier(Supplier<? extends ExecutorService> supplier, int supplierIndex, String supplierCategory, List<ExecutorServiceSupplierObserver.MethodInvocation> methodInvocations) Description copied from interface:ExecutorServiceSupplierObserverMakes a supplier known to the observer and returns a supplier context for the supplier to use for future interactions with the observer, using theExecutorServiceSupplierObserver.MethodInvocationabstraction for invoking methods to obtain metric values.- Specified by:
registerSupplierin 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
SupplierObserverContextfor the supplier
-