Class PriorityPropagationTaskExecutor
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.propagation.AbstractPropagationTaskExecutor
-
- org.apache.syncope.core.provisioning.java.propagation.PriorityPropagationTaskExecutor
-
- All Implemented Interfaces:
PropagationTaskExecutor
public class PriorityPropagationTaskExecutor extends AbstractPropagationTaskExecutor
Sorts the tasks to be executed according to relatedExternalResource
'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 Summary
Fields Modifier and Type Field Description protected ThreadPoolTaskExecutor
taskExecutor
-
Fields inherited from class org.apache.syncope.core.provisioning.java.propagation.AbstractPropagationTaskExecutor
anyUtilsFactory, auditManager, connectorManager, connObjectUtils, LOG, notificationManager, outboundMatcher, perContextActions, plainSchemaDAO, publisher, resourceDAO, retryTemplates, taskDAO, taskDataBinder, taskUtilsFactory, validator
-
-
Constructor Summary
Constructors Constructor Description PriorityPropagationTaskExecutor(ConnectorManager connectorManager, ConnObjectUtils connObjectUtils, TaskDAO taskDAO, ExternalResourceDAO resourceDAO, PlainSchemaDAO plainSchemaDAO, NotificationManager notificationManager, AuditManager auditManager, TaskDataBinder taskDataBinder, AnyUtilsFactory anyUtilsFactory, TaskUtilsFactory taskUtilsFactory, OutboundMatcher outboundMatcher, PlainAttrValidationManager validator, ApplicationEventPublisher publisher, ThreadPoolTaskExecutor taskExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropagationReporter
execute(Collection<PropagationTaskInfo> taskInfos, boolean nullPriorityAsync, String executor)
Execute the given collection of tasks.protected PropagationTaskCallable
newPropagationTaskCallable(PropagationTaskInfo taskInfo, PropagationReporter reporter, String executor)
Creates new instances ofPropagationTaskCallable
for usage withCompletionService
.-
Methods inherited from class org.apache.syncope.core.provisioning.java.propagation.AbstractPropagationTaskExecutor
checkMandatoryMissing, createOrUpdate, delete, doCreate, doExecute, doUpdate, doUpdateDelta, execute, expireRetryTemplate, getPropagationActions, getRemoteObject, getRemoteObject, hasToBeregistered, isFetchRemoteObj, rejected, retryTemplate
-
-
-
-
Field Detail
-
taskExecutor
protected final ThreadPoolTaskExecutor taskExecutor
-
-
Constructor Detail
-
PriorityPropagationTaskExecutor
public PriorityPropagationTaskExecutor(ConnectorManager connectorManager, ConnObjectUtils connObjectUtils, TaskDAO taskDAO, ExternalResourceDAO resourceDAO, PlainSchemaDAO plainSchemaDAO, NotificationManager notificationManager, AuditManager auditManager, TaskDataBinder taskDataBinder, AnyUtilsFactory anyUtilsFactory, TaskUtilsFactory taskUtilsFactory, OutboundMatcher outboundMatcher, PlainAttrValidationManager validator, ApplicationEventPublisher publisher, ThreadPoolTaskExecutor taskExecutor)
-
-
Method Detail
-
newPropagationTaskCallable
protected PropagationTaskCallable newPropagationTaskCallable(PropagationTaskInfo taskInfo, PropagationReporter reporter, String executor)
Creates new instances ofPropagationTaskCallable
for usage withCompletionService
.- Parameters:
taskInfo
- to be executedreporter
- to report propagation execution statusexecutor
- user that triggered the propagation execution- Returns:
- new
PropagationTaskCallable
instance for usage withCompletionService
-
execute
public PropagationReporter execute(Collection<PropagationTaskInfo> taskInfos, boolean nullPriorityAsync, String executor)
Description copied from interface:PropagationTaskExecutor
Execute the given collection of tasks. The process is interrupted as soon as the result of the communication with a resource with non-null priority is in error.- Parameters:
taskInfos
- to be execute, in given ordernullPriorityAsync
- asynchronously executes tasks related to resources with no priorityexecutor
- the executor of this task- Returns:
- reporter to report propagation execution status
-
-