java.lang.Object
org.sentrysoftware.metricshub.engine.strategy.AbstractStrategy
org.sentrysoftware.metricshub.engine.strategy.collect.CollectStrategy
All Implemented Interfaces:
Runnable, IStrategy

public class CollectStrategy extends AbstractStrategy
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.

  • Constructor Details

    • CollectStrategy

      public CollectStrategy(@NonNull @NonNull TelemetryManager telemetryManager, @NonNull @NonNull Long strategyTime, @NonNull @NonNull ClientsExecutor clientsExecutor, @NonNull @NonNull ExtensionManager extensionManager)
      Constructs a new CollectStrategy using 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