Class MonitoringOrchestrator
- java.lang.Object
-
- com.inhousegreenhouse.ch.backend.orchestrator.MonitoringOrchestrator
-
public class MonitoringOrchestrator extends java.lang.ObjectSensor observers orchestrator required to monitor the greenhouse sensors.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanisRunningIs 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.CyclicBarrieracquireBarrier()Acquire the barrier used to synchronize all threads.voidstartMonitoring(MonitoringConfig config, WateringSystem wateringSystem)Start the monitoring orchestrator.voidstopMonitoring()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.
-
-