Interface ExecutorServiceSupplierObserver
-
- All Known Implementing Classes:
ExecutorServiceMetricsObserver
public interface ExecutorServiceSupplierObserverBehavior for observers of the various executor service suppliers.This component identifies suppliers to observers using:
- the supplier itself,
- the supplier category (scheduled, server, ad-hoc), and
- the index of this supplier among suppliers in the same category.
- the executor service itself, and
- the index of the executor service among those from the same supplier.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceExecutorServiceSupplierObserver.MethodInvocationInformation about method invocations to retrieve interesting (e.g., metrics) values from an executor service.static interfaceExecutorServiceSupplierObserver.SupplierObserverContextContext with which suppliers (or their surrogates) interact with observers.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExecutorServiceSupplierObserver.SupplierObserverContextregisterSupplier(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.ExecutorServiceSupplierObserver.SupplierObserverContextregisterSupplier(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.
-
-
-
Method Detail
-
registerSupplier
ExecutorServiceSupplierObserver.SupplierObserverContext registerSupplier(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.- 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
ExecutorServiceSupplierObserver.SupplierObserverContext 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.- 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
-
-