Class PriorityPropagationTaskExecutor

  • All Implemented Interfaces:
    org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor

    public class PriorityPropagationTaskExecutor
    extends AbstractPropagationTaskExecutor
    Sorts the tasks to be executed according to related ExternalResource's priority, then execute. Tasks related to resources with NULL priority are executed after other tasks, concurrently. Failure during execution of a task related to resource with non-NULL priority are treated as fatal and will interrupt the whole process, resulting in a global failure.
    • Field Detail

      • taskExecutor

        protected final org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor taskExecutor
    • Constructor Detail

      • PriorityPropagationTaskExecutor

        public PriorityPropagationTaskExecutor​(org.apache.syncope.core.provisioning.api.ConnectorManager connectorManager,
                                               ConnObjectUtils connObjectUtils,
                                               org.apache.syncope.core.persistence.api.dao.UserDAO userDAO,
                                               org.apache.syncope.core.persistence.api.dao.GroupDAO groupDAO,
                                               org.apache.syncope.core.persistence.api.dao.AnyObjectDAO anyObjectDAO,
                                               org.apache.syncope.core.persistence.api.dao.TaskDAO taskDAO,
                                               org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO resourceDAO,
                                               org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO plainSchemaDAO,
                                               org.apache.syncope.core.provisioning.api.notification.NotificationManager notificationManager,
                                               org.apache.syncope.core.provisioning.api.AuditManager auditManager,
                                               org.apache.syncope.core.provisioning.api.data.TaskDataBinder taskDataBinder,
                                               org.apache.syncope.core.persistence.api.entity.AnyUtilsFactory anyUtilsFactory,
                                               org.apache.syncope.core.persistence.api.entity.task.TaskUtilsFactory taskUtilsFactory,
                                               OutboundMatcher outboundMatcher,
                                               org.apache.syncope.core.persistence.api.attrvalue.validation.PlainAttrValidationManager validator,
                                               org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor taskExecutor)
    • Method Detail

      • newPropagationTaskCallable

        protected org.apache.syncope.core.provisioning.api.propagation.PropagationTaskCallable newPropagationTaskCallable​(org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo taskInfo,
                                                                                                                          org.apache.syncope.core.provisioning.api.propagation.PropagationReporter reporter,
                                                                                                                          String executor)
        Creates new instances of PropagationTaskCallable for usage with CompletionService.
        Parameters:
        taskInfo - to be executed
        reporter - to report propagation execution status
        executor - user that triggered the propagation execution
        Returns:
        new PropagationTaskCallable instance for usage with CompletionService
      • execute

        public org.apache.syncope.core.provisioning.api.propagation.PropagationReporter execute​(Collection<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> taskInfos,
                                                                                                boolean nullPriorityAsync,
                                                                                                String executor)