Class MonitoringOrchestrator
- java.lang.Object
-
- com.inhousegreenhouse.ch.backend.orchestrator.MonitoringOrchestrator
-
public class MonitoringOrchestrator extends java.lang.Object
Sensor observers orchestrator required to monitor the greenhouse sensors.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
isRunning
Is the orchestrator running?
-
Constructor Summary
Constructors Constructor Description MonitoringOrchestrator(SensorList sensorList, java.util.Properties settings)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.concurrent.CyclicBarrier
acquireBarrier()
Acquire the barrier used to synchronize all threads.void
startMonitoring(MonitoringConfig config, WateringSystem wateringSystem)
Start the monitoring orchestrator.void
stopMonitoring()
Stop the monitoring orchestrator.
-
-
-
Constructor Detail
-
MonitoringOrchestrator
public MonitoringOrchestrator(SensorList sensorList, java.util.Properties settings)
Constructor.- Parameters:
sensorList
- List of sensors to monitor.settings
- The loaded greenhouse settings.
-
-
Method Detail
-
startMonitoring
public void startMonitoring(MonitoringConfig config, WateringSystem wateringSystem)
Start the monitoring orchestrator.- Parameters:
config
- Monitoring configuration.wateringSystem
- A reference to the watering system object.
-
acquireBarrier
public static java.util.concurrent.CyclicBarrier acquireBarrier()
Acquire the barrier used to synchronize all threads.- Returns:
- A Cyclic barrier.
-
stopMonitoring
public void stopMonitoring()
Stop the monitoring orchestrator.
-
-