The sk.ipesoft.sgcom.production.ScheduleImpl class and its nested classes ensure that tasks are scheduled and executed at the scheduled time. A single-threaded scheduleExecutor (ScheduledExecutorService) and workExecutor (ExecutorService) with a dynamic number of threads are used for this.
Tasks whose job is to periodically repeat periodic events from the configuration are inserted into the scheduleExecutor. There is one task in the scheduleExecutor for each PeriodicEvent entity. Since this is a single-threaded ExecutorService, the execution of data collection and transmission is moved to the workExecutor.


Napíšte komentár