Class PrepareCollectStrategy

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

public class PrepareCollectStrategy extends AbstractStrategy
The PrepareCollectStrategy class represents a strategy for preparing the collection of metrics from monitors in a monitoring system.

This class is part of a strategy design pattern and is responsible for preparing the collection by saving metric values and updating collect times before the actual collection operation.

It iterates through all monitors and metrics managed by the telemetry manager, saving metric values, and updating collect times for discovered metrics.

  • Constructor Details

    • PrepareCollectStrategy

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