Class CollectStrategy
java.lang.Object
org.sentrysoftware.metricshub.engine.strategy.AbstractStrategy
org.sentrysoftware.metricshub.engine.strategy.collect.CollectStrategy
The
CollectStrategy class represents a strategy for collecting metrics from various connectors
in a monitoring system.
This class is part of a strategy design pattern and is responsible for executing the collection of monitors and their metrics for a given host and connectors.
It uses a combination of sequential and parallel execution based on the configuration to efficiently collect metrics from different connectors.
-
Field Summary
Fields inherited from class org.sentrysoftware.metricshub.engine.strategy.AbstractStrategy
CONNECTOR_ID_FORMAT -
Constructor Summary
ConstructorsConstructorDescriptionCollectStrategy(@NonNull TelemetryManager telemetryManager, @NonNull Long strategyTime, @NonNull ClientsExecutor clientsExecutor, @NonNull ExtensionManager extensionManager) Constructs a newCollectStrategyusing the provided telemetry manager, strategy time, and clients executor. -
Method Summary
Methods inherited from class org.sentrysoftware.metricshub.engine.strategy.AbstractStrategy
getStrategyTimeoutMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.sentrysoftware.metricshub.engine.strategy.IStrategy
getStrategyTime
-
Constructor Details
-
CollectStrategy
public CollectStrategy(@NonNull @NonNull TelemetryManager telemetryManager, @NonNull @NonNull Long strategyTime, @NonNull @NonNull ClientsExecutor clientsExecutor, @NonNull @NonNull ExtensionManager extensionManager) Constructs a newCollectStrategyusing the provided telemetry manager, strategy time, and clients executor.- Parameters:
telemetryManager- The telemetry manager responsible for managing telemetry-related operations.strategyTime- The time when the strategy is executed.clientsExecutor- The executor for managing clients used in the strategy.extensionManager- The extension manager where all the required extensions are handled.
-
-
Method Details
-
run
public void run()This method is the main collection step method
-