Interface PlainIterativeActivityRunSpecifics<I>
- Type Parameters:
I
- Kind of items that are processed.
- All Superinterfaces:
ImplicitSegmentationResolver
,ItemProcessor<I>
,IterativeActivityRunSpecifics
- All Known Implementing Classes:
AsyncUpdateActivityRun
,LiveSyncActivityRun
,PlainIterativeActivityRun
public interface PlainIterativeActivityRunSpecifics<I>
extends IterativeActivityRunSpecifics, ItemProcessor<I>
Provides execution logic and/or execution state related to a plain iterative activity run.
Main responsibilities:
1. Starting the item source and submitting the items to processing.
2. "Pure" processing of an item found, free from threading, reporting, error handling, tracing, etc.
(Inherited from
ItemProcessor
.)
3. Specifying default error action if no error handling policy is defined or matching.-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable Integer
Determines the current bucket size.default @Nullable Integer
determineOverallSize
(OperationResult result) Determines the expected total progress.void
iterateOverItemsInBucket
(OperationResult opResult) Starts the item source for the current bucket (e.g.Methods inherited from interface com.evolveum.midpoint.repo.common.activity.run.processing.ItemProcessor
processItem
Methods inherited from interface com.evolveum.midpoint.repo.common.activity.run.IterativeActivityRunSpecifics
afterBucketProcessing, afterRun, beforeBucketProcessing, beforeRun, createReportingCharacteristics, resolveImplicitSegmentation, useOtherActivityStateForCounters
-
Method Details
-
iterateOverItemsInBucket
Starts the item source for the current bucket (e.g. by issuing the `synchronize` call) and begins processing items generated by it. Returns when the source finishes. SeeIterativeActivityRun.iterateOverItemsInBucket(OperationResult)
. Majority of plain iterative activities are not bucketed. However, some of them are, e.g. audit report export. Note that the bucket can be obtained from the activity run. It is included here simply for convenience.- Throws:
CommonException
-
determineOverallSize
@Nullable default @Nullable Integer determineOverallSize(OperationResult result) throws CommonException, ActivityRunException Determines the expected total progress. Majority of current plain iterative activities do not know the number of items: for example, ConnId SyncOp does not provide information about how many changes are on the resource. But there might be some activities that do.- Throws:
CommonException
ActivityRunException
-
determineCurrentBucketSize
@Nullable default @Nullable Integer determineCurrentBucketSize(OperationResult result) throws CommonException Determines the current bucket size. Not applicable to the majority of current plain iterative activities, just likedetermineOverallSize(OperationResult)
.- Throws:
CommonException
-
getDefaultErrorAction
- Returns:
- Default error action if no policy is specified or if no policy entry matches.
-