Class MonitoringOrchestrator


  • public class MonitoringOrchestrator
    extends java.lang.Object
    Sensor observers orchestrator required to monitor the greenhouse sensors.
    • Field Detail

      • isRunning

        public static volatile boolean isRunning
        Is the orchestrator running?
    • 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.