Class DetectionStrategy
java.lang.Object
org.sentrysoftware.metricshub.engine.strategy.AbstractStrategy
org.sentrysoftware.metricshub.engine.strategy.detection.DetectionStrategy
The
DetectionStrategy class represents the strategy for detecting and creating monitors based on the configuration and connector detection results.
It is responsible for running connector detection, creating monitors for the detected connectors, and updating the status of configured connectors.
The class extends AbstractStrategy and implements the detection and creation logic for monitors based on connector detection results.
It uses the TelemetryManager to manage monitors and metrics associated with connectors.
-
Field Summary
Fields inherited from class org.sentrysoftware.metricshub.engine.strategy.AbstractStrategy
CONNECTOR_ID_FORMAT -
Constructor Summary
ConstructorsConstructorDescriptionDetectionStrategy(@NonNull TelemetryManager telemetryManager, @NonNull Long strategyTime, @NonNull ClientsExecutor clientsExecutor, @NonNull ExtensionManager extensionManager) Builder for constructing instances ofDetectionStrategy. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateConnectorMonitor(ConnectorTestResult connectorTestResult) This method creates a connector monitor in TelemetryManager for the given ConnectorTestResult instancevoidrun()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
-
DetectionStrategy
public DetectionStrategy(@NonNull @NonNull TelemetryManager telemetryManager, @NonNull @NonNull Long strategyTime, @NonNull @NonNull ClientsExecutor clientsExecutor, @NonNull @NonNull ExtensionManager extensionManager) Builder for constructing instances ofDetectionStrategy.- Parameters:
telemetryManager- The telemetry manager for managing monitors and metrics.strategyTime- The time at which the detection strategy is executed.clientsExecutor- The executor for running connector clients.extensionManager- The extension manager where all the required extensions are handled.
-
-
Method Details
-
run
public void run() -
createConnectorMonitor
This method creates a connector monitor in TelemetryManager for the given ConnectorTestResult instance- Parameters:
connectorTestResult- The result of testing criteria for a connector during the detection process
-