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
- Direct Known Subclasses:
InstrumentedPriorityPropagationTaskExecutor
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 Summary
FieldsFields 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
ConstructorsConstructorDescriptionPriorityPropagationTaskExecutor(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, AsyncTaskExecutor taskExecutor) -
Method Summary
Modifier and TypeMethodDescriptionexecute(Collection<PropagationTaskInfo> taskInfos, boolean nullPriorityAsync, String executor) Execute the given collection of tasks.protected booleanfailed(PropagationTaskInfo taskInfpo, TaskExec<PropagationTask> exec, ExecStatus execStatus) protected Callable<TaskExec<PropagationTask>> newPropagationTaskCallable(PropagationTaskInfo taskInfo, PropagationReporter reporter, String executor) Creates new instances ofCallablefor 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 Details
-
taskExecutor
-
-
Constructor Details
-
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, AsyncTaskExecutor taskExecutor)
-
-
Method Details
-
newPropagationTaskCallable
protected Callable<TaskExec<PropagationTask>> newPropagationTaskCallable(PropagationTaskInfo taskInfo, PropagationReporter reporter, String executor) Creates new instances ofCallablefor usage withCompletionService.- Parameters:
taskInfo- to be executedreporter- to report propagation execution statusexecutor- user that triggered the propagation execution- Returns:
- new
Callableinstance for usage withCompletionService
-
failed
protected boolean failed(PropagationTaskInfo taskInfpo, TaskExec<PropagationTask> exec, ExecStatus execStatus) -
execute
public PropagationReporter execute(Collection<PropagationTaskInfo> taskInfos, boolean nullPriorityAsync, String executor) Description copied from interface:PropagationTaskExecutorExecute 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
-