Class JobStatusUpdater


  • public class JobStatusUpdater
    extends Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory  
      protected org.apache.syncope.core.persistence.api.dao.JobStatusDAO jobStatusDAO  
      protected static org.slf4j.Logger LOG  
    • Constructor Summary

      Constructors 
      Constructor Description
      JobStatusUpdater​(org.apache.syncope.core.persistence.api.dao.JobStatusDAO jobStatusDAO, org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory)  
    • Field Detail

      • LOG

        protected static final org.slf4j.Logger LOG
      • jobStatusDAO

        protected final org.apache.syncope.core.persistence.api.dao.JobStatusDAO jobStatusDAO
      • entityFactory

        protected final org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory
    • Constructor Detail

      • JobStatusUpdater

        public JobStatusUpdater​(org.apache.syncope.core.persistence.api.dao.JobStatusDAO jobStatusDAO,
                                org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory)
    • Method Detail

      • update

        @Async("jobStatusUpdaterThreadExecutor")
        @EventListener
        public void update​(org.apache.syncope.core.provisioning.api.event.JobStatusEvent event)
        It's important to note that responding to job status updates must be done in async mode, and via a separate special thread executor that attempts to synchronize job execution serially by only making one thread active at a given time. Not doing so will force the event executor to launch separate threads per each status update, which would result in multiple concurrent INSERT operations on the database, and failing.
        Parameters:
        event - the event