Class PreSourcesStrategy

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

public class PreSourcesStrategy extends AbstractStrategy
Implements pre-sources processing strategy extending the functionality of AbstractStrategy. This strategy is specifically designed to handle pre-sources using a specified connector. Pre-sources are defined by a connector to facilitate factorization and convenience, allowing these sources to be processed at the beginning of all jobs. This early processing ensures that any necessary setup or preliminary data manipulation is completed before the main job execution phases.
  • Constructor Details

    • PreSourcesStrategy

      public PreSourcesStrategy(@NonNull @NonNull TelemetryManager telemetryManager, @NonNull @NonNull Long strategyTime, @NonNull @NonNull ClientsExecutor clientsExecutor, @NonNull @NonNull Connector connector, @NonNull @NonNull ExtensionManager extensionManager)
      Initializes a new instance of PreSourcesStrategy with the necessary components for executing the strategy. This constructor sets up the strategy with a telemetry manager, strategy execution time, a clients executor, and a specific connector to process pre-sources.
      Parameters:
      telemetryManager - The telemetry manager responsible for managing telemetry data (monitors and metrics).
      strategyTime - The execution time of the strategy, used for timing purpose.
      clientsExecutor - An executor service for handling client operations within the pre-sources.
      connector - The specific connector instance where the pre-sources are defined.
      extensionManager - The extension manager where all the required extensions are handled.
  • Method Details

    • run

      public void run()
      Executes the strategy's core logic, processing pre-sources associated with the connector.