Class LiveSyncActivityRun
java.lang.Object
com.evolveum.midpoint.repo.common.activity.run.AbstractActivityRun<WD,AH,BS>
com.evolveum.midpoint.repo.common.activity.run.LocalActivityRun<WD,AH,WS>
com.evolveum.midpoint.repo.common.activity.run.IterativeActivityRun<I,WD,AH,WS>
com.evolveum.midpoint.repo.common.activity.run.PlainIterativeActivityRun<LiveSyncEvent,LiveSyncWorkDefinition,LiveSyncActivityHandler,LiveSyncWorkStateType>
com.evolveum.midpoint.model.impl.sync.tasks.sync.LiveSyncActivityRun
- All Implemented Interfaces:
ImplicitSegmentationResolver
,IterativeActivityRunSpecifics
,PlainIterativeActivityRunSpecifics<LiveSyncEvent>
,ItemProcessor<LiveSyncEvent>
,ExecutionSupport
,DebugDumpable
public final class LiveSyncActivityRun
extends PlainIterativeActivityRun<LiveSyncEvent,LiveSyncWorkDefinition,LiveSyncActivityHandler,LiveSyncWorkStateType>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.evolveum.midpoint.task.api.ExecutionSupport
ExecutionSupport.CountersGroup
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ThreadLocal<Integer>
Local sequence number of a change that is being processed in the current thread.Fields inherited from class com.evolveum.midpoint.repo.common.activity.run.IterativeActivityRun
beans, bucket, coordinator, errorState, transientRunStatistics
Fields inherited from class com.evolveum.midpoint.repo.common.activity.run.AbstractActivityRun
activity, activityState, endTimestamp, startTimestamp, taskRun
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Constructor Summary
ConstructorDescriptionLiveSyncActivityRun
(@NotNull ActivityRunInstantiationContext<LiveSyncWorkDefinition, LiveSyncActivityHandler> activityRun) -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterRun
(OperationResult result) Called after the run.void
beforeRun
(OperationResult result) Called before the run.@NotNull ActivityReportingCharacteristics
This method should be called only after the concrete instance is fully initialized.protected String
Channel URI that should be set into the task during this activity run.protected @NotNull ObjectReferenceType
Returns the value that should be put into task.objectRef.void
iterateOverItemsInBucket
(OperationResult opResult) Starts the item source (e.g.boolean
processItem
(@NotNull ItemProcessingRequest<LiveSyncEvent> request, @NotNull RunningTask workerTask, @NotNull OperationResult result) Does the "pure" processing, free of any reporting, error handling, tracing, and similar issues.Methods inherited from class com.evolveum.midpoint.repo.common.activity.run.PlainIterativeActivityRun
isInRepository, prepareItemSourceForCurrentBucket
Methods inherited from class com.evolveum.midpoint.repo.common.activity.run.IterativeActivityRun
canUpdateThreadLocalStatistics, determineActivityStateForCounters, determineCurrentBucketSize, determineOverallSize, disableGlobalConnIdOperationsListener, enableGlobalConnIdOperationsListener, ensureNoParallelism, ensureNoWorkerThreads, getBucket, getConnIdOperationsReport, getContextDescription, getContextDescriptionSpaced, getErrorState, getItemsReport, getRootTaskOid, getShortName, getTransientRunStatistics, handleError, isMultithreaded, runLocally, setContextDescription, shouldReportConnIdOperations, shouldReportInternalOperations, shouldReportItems, updateStatistics
Methods inherited from class com.evolveum.midpoint.repo.common.activity.run.LocalActivityRun
getCurrentResultStatusBean, getSimulationTransaction, getTaskExecutionMode, isExcludedFromStalenessChecking, runInternal, shouldUpdateProgressInStateOverview, updateItemProgressInTreeOverviewIfTimePassed
Methods inherited from class com.evolveum.midpoint.repo.common.activity.run.AbstractActivityRun
areActionsExecutedStatisticsSupported, areRunRecordsSupported, areStatisticsSupported, areSynchronizationStatisticsSupported, canRun, debugDump, debugDumpExtra, determineActivityStateDefinition, ensureFullExecution, ensureNoDryRun, ensureNoPreviewNorDryRun, getActivity, getActivityDefinition, getActivityExecutionMode, getActivityHandler, getActivityPath, getActivityState, getActivityStateDefinition, getBeans, getItemsProcessed, getLocalParentRun, getReportingCharacteristics, getRunningTask, getStartTimestampRequired, getTaskRun, getTreeStateOverview, getWorkDefinition, incrementCounters, incrementProgress, isBucketAnalysis, isDryRun, isFullExecution, isNoExecution, isNonScavengingWorker, isProgressSupported, isWorker, onActivityRealizationComplete, onActivityRealizationStart, recordIterativeOperationStart, run, setInstanceReady, shouldCreateWorkStateOnInitialization, standardRunResult, standardRunResult, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
Methods inherited from interface com.evolveum.midpoint.task.api.ExecutionSupport
getActivityExecutionMode, getActivityPath, incrementCounters, recordIterativeOperationStart
Methods inherited from interface com.evolveum.midpoint.repo.common.activity.run.IterativeActivityRunSpecifics
afterBucketProcessing, beforeBucketProcessing, resolveImplicitSegmentation, useOtherActivityStateForCounters
Methods inherited from interface com.evolveum.midpoint.repo.common.activity.run.PlainIterativeActivityRunSpecifics
determineCurrentBucketSize, determineOverallSize
-
Field Details
-
CHANGE_BEING_PROCESSED
Local sequence number of a change that is being processed in the current thread. Actually, it is a hack to enable testing: The code in mappings can obtain this information and do some asserts on it. When the information will be propagated into e.g. lensContext, we should remove this hack.
-
-
Constructor Details
-
LiveSyncActivityRun
public LiveSyncActivityRun(@NotNull @NotNull ActivityRunInstantiationContext<LiveSyncWorkDefinition, LiveSyncActivityHandler> activityRun)
-
-
Method Details
-
createReportingCharacteristics
Description copied from class:AbstractActivityRun
This method should be called only after the concrete instance is fully initialized.- Specified by:
createReportingCharacteristics
in interfaceIterativeActivityRunSpecifics
- Overrides:
createReportingCharacteristics
in classLocalActivityRun<LiveSyncWorkDefinition,
LiveSyncActivityHandler, LiveSyncWorkStateType> - Returns:
- Reporting characteristics of the activity run. They e.g. provide default values
for
ActivityReportingDefinition
.
-
beforeRun
Description copied from interface:IterativeActivityRunSpecifics
Called before the run. Note that e.g. for search-based activities the search specification is *not* known at this moment.- Throws:
ActivityRunException
CommonException
-
getDesiredTaskObjectRef
Description copied from class:LocalActivityRun
Returns the value that should be put into task.objectRef. Should be overridden by subclasses. It should be called _after_IterativeActivityRunSpecifics.beforeRun(OperationResult)
method, in order to give the execution a chance to prepare data for this method. -
afterRun
Description copied from interface:IterativeActivityRunSpecifics
Called after the run. -
iterateOverItemsInBucket
public void iterateOverItemsInBucket(OperationResult opResult) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException, PolicyViolationException Description copied from class:IterativeActivityRun
Starts the item source (e.g. `searchObjectsIterative` call or `synchronize` call) and begins processing items generated by it. Returns when the source finishes. For example: - for search-based tasks, this call returns immediately after the iterative search is over; - for live sync task, this returns after all changes were fetched and acknowledged, and the resulting token was written; - for async update task, this returns also after all changes were fetched and acknowledged and confirmed to the source.- Specified by:
iterateOverItemsInBucket
in interfacePlainIterativeActivityRunSpecifics<LiveSyncEvent>
- Specified by:
iterateOverItemsInBucket
in classIterativeActivityRun<LiveSyncEvent,
LiveSyncWorkDefinition, LiveSyncActivityHandler, LiveSyncWorkStateType> - Throws:
CommunicationException
ObjectNotFoundException
SchemaException
SecurityViolationException
ConfigurationException
ExpressionEvaluationException
PolicyViolationException
-
processItem
public boolean processItem(@NotNull @NotNull ItemProcessingRequest<LiveSyncEvent> request, @NotNull @NotNull RunningTask workerTask, @NotNull @NotNull OperationResult result) throws CommonException, ActivityRunException Description copied from interface:ItemProcessor
Does the "pure" processing, free of any reporting, error handling, tracing, and similar issues.- Specified by:
processItem
in interfaceItemProcessor<LiveSyncEvent>
- Specified by:
processItem
in classIterativeActivityRun<LiveSyncEvent,
LiveSyncWorkDefinition, LiveSyncActivityHandler, LiveSyncWorkStateType> - Throws:
CommonException
ActivityRunException
-
getDefaultErrorAction
- Specified by:
getDefaultErrorAction
in interfacePlainIterativeActivityRunSpecifics<LiveSyncEvent>
- Specified by:
getDefaultErrorAction
in classIterativeActivityRun<LiveSyncEvent,
LiveSyncWorkDefinition, LiveSyncActivityHandler, LiveSyncWorkStateType> - Returns:
- Default error action if no policy is specified or if no policy entry matches.
-
getChannelOverride
Description copied from class:IterativeActivityRun
Channel URI that should be set into the task during this activity run. (If not null.)
-