Package com.evolveum.midpoint.task.api
Interface RunningTask
- All Superinterfaces:
- CanRunSupplier,- ConnIdOperationsListener,- DebugDumpable,- MappingStatisticsCollector,- NotificationStatisticsCollector,- ProgressCollector,- RunningTaskStatisticsCollector,- StatisticsCollector,- Task,- TaskActionsExecutedCollector,- TaskIterativeOperationCollector,- TaskSynchronizationStatisticsCollector
- All Known Subinterfaces:
- RunningLightweightTask
A task that is directly used to execute the handler code.
  It is a very sensitive structure. First of all, it must be thread-safe because it is used for the handler code execution
  and at the same time accessed by clients that need to check its state. There are two such situations:
  (1) Lightweight Asynchronous Tasks because they have no persistent representation. The only instance that exists
      is the one that is being executed by a handler.
  (2) When a client asks the task manager for a current state of the task (typically being interested in operational stats).
      The information could be fetched from the repository but it would be a bit outdated. This situation can be avoided
      by retrieving information always from the repository, sacrificing information timeliness a bit. But the (1) cannot.
  Some information related to task execution (e.g. list of lightweight asynchronous tasks, information on task thread, etc)
  is relevant only for running tasks. Therefore they are moved here.
- 
Field SummaryFields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRINGFields inherited from interface com.evolveum.midpoint.task.api.TaskDOT_INTERFACE
- 
Method SummaryModifier and TypeMethodDescription@NotNull RunningLightweightTaskcreateSubtask(@NotNull LightweightTaskHandler handler) Creates a transient subtask, ready to execute a given LightweightTaskHandler.voidPrecondition: there are no runnable nor running LATsdefault @NotNull ExecutionModeTypeReturns the execution mode (e.g.Collection<? extends RunningLightweightTask>@Nullable Task@NotNull TaskTODO EXPERIMENTAL@NotNull StringTODOCollection<? extends RunningLightweightTask>Collection<? extends RunningLightweightTask>booleanvoidmakeWaitingForOtherTasks(TaskExecutionStateType execState, TaskUnpauseActionType unpauseAction) Changes scheduling status to WAITING, and execution state to the given value.voidmakeWaitingForOtherTasks(TaskUnpauseActionType unpauseAction) Changes scheduling status to WAITING.voidsetExcludedFromStalenessChecking(boolean value) Sets the "excluded from staleness checking" flag.voidsetExecutionSupport(ExecutionSupport executionContext) Methods inherited from interface com.evolveum.midpoint.task.api.CanRunSuppliercanRunMethods inherited from interface com.evolveum.midpoint.task.api.ConnIdOperationsListeneronConnIdOperationEnd, onConnIdOperationResume, onConnIdOperationStart, onConnIdOperationSuspendMethods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.schema.statistics.MappingStatisticsCollectorrecordMappingOperationMethods inherited from interface com.evolveum.midpoint.schema.statistics.NotificationStatisticsCollectorrecordNotificationOperationMethods inherited from interface com.evolveum.midpoint.task.api.RunningTaskStatisticsCollectorincrementLegacyProgressAndStoreStatisticsIfTimePassed, refreshThreadLocalStatistics, restartCollectingStatisticsFromZero, setStatisticsRepoStoreInterval, startCollectingStatistics, storeStatisticsIntoRepository, storeStatisticsIntoRepositoryIfTimePassed, updateAndStoreStatisticsIntoRepository, updateOperationStatsInTaskPrismMethods inherited from interface com.evolveum.midpoint.schema.statistics.StatisticsCollectorrecordStateMessageMethods inherited from interface com.evolveum.midpoint.task.api.TaskaddArchetypeInformation, addArchetypeInformationIfMissing, addDependent, addExtensionProperty, addExtensionReference, addTracingRequest, applyDeltasImmediate, applyModificationsTransient, areShadowChangesSimulated, assertPersistentExecution, canSee, canSee, canSee, createSubtask, deleteExtensionProperty, doesItemExist, flushPendingModifications, getActivitiesStateOrClone, getActivityStateOrClone, getActivityStateOrClone, getActivityTreeStateOverviewOrClone, getAggregatedLiveOperationStats, getBinding, getCachingProfiles, getChannel, getCleanupAfterCompletion, getCompletionTimestamp, getContainerableOrClone, getDependents, getDescription, getExecutionConstraints, getExecutionEnvironment, getExecutionMode, getExecutionState, getExpectedTotal, getExtensionClone, getExtensionContainerRealValueOrClone, getExtensionItemOrClone, getExtensionOrClone, getExtensionPropertyOrClone, getExtensionPropertyRealValue, getExtensionReferenceOrClone, getGroup, getGroups, getGroupsWithLimits, getHandlerUri, getItemRealValueOrClone, getLastRunFinishTimestamp, getLastRunStartTimestamp, getLegacyProgress, getName, getNextRunStartTime, getNode, getNodeAsObserved, getObject, getObjectOid, getObjectRefOrClone, getOid, getOrCreateExtension, getOwner, getOwnerRef, getParent, getParentAndRoot, getParentTask, getPathToRootTask, getPersistenceStatus, getPropertyRealValue, getPropertyRealValueOrClone, getRawTaskObjectClone, getRawTaskObjectClonedIfNecessary, getRecurrence, getReferenceRealValue, getReferenceRealValues, getRequestee, getResult, getResultStatus, getRoot, getRootActivityCompletionTimestamp, getRootActivityDefinitionOrClone, getSchedule, getScheduleInterval, getSchedulingState, getSelfReference, getSelfReferenceFull, getSimulationTransaction, getStoredOperationStatsOrClone, getTaskIdentifier, getThreadStopAction, getTracingProfile, getTracingRequestedFor, getUpdatedTaskObject, getVersion, getWaitingReason, getWorkState, hasAssignments, hasScheduleInterval, incrementLegacyProgressTransient, isAsynchronous, isClosed, isExecutionFullyPersistent, isIndestructible, isLooselyBound, isPersistent, isProductionConfiguration, isReady, isRecurring, isRoot, isRunnable, isRunning, isSingle, isSuspended, isTightlyBound, isTransient, isWaiting, listDependents, listPrerequisiteTasks, listSubtasks, listSubtasks, listSubtasksDeeply, listSubtasksDeeply, makeSingle, modify, modify, refresh, registerConnIdOperationsListener, removeTracingRequests, setChannel, setCleanupAfterCompletion, setDescription, setDescriptionImmediate, setExecutionConstraints, setExecutionEnvironment, setExecutionMode, setExpectedTotal, setExtensionContainer, setExtensionContainerValue, setExtensionItem, setExtensionProperty, setExtensionPropertyImmediate, setExtensionPropertyValue, setExtensionReference, setHandlerUri, setInitialExecutionAndScheduledState, setInitiallyRunnable, setInitiallySuspended, setInitiallyWaitingForPrerequisites, setItemRealValues, setItemRealValuesCollection, setLegacyProgress, setLegacyProgressImmediate, setName, setName, setNameImmediate, setObjectRef, setObjectRef, setOwner, setOwnerRef, setPropertyRealValue, setRequesteeTransient, setResult, setRootActivityDefinition, setSchedule, setSimulationTransaction, setThreadStopAction, setTracingProfile, unregisterConnIdOperationsListenerMethods inherited from interface com.evolveum.midpoint.schema.statistics.TaskActionsExecutedCollectorrecordObjectActionExecuted, recordObjectActionExecuted, recordObjectActionExecuted, startCollectingActionsExecuted, stopCollectingActionsExecutedMethods inherited from interface com.evolveum.midpoint.schema.statistics.TaskIterativeOperationCollectorrecordIterativeOperationStart, recordIterativeOperationStart, recordIterativeOperationStartMethods inherited from interface com.evolveum.midpoint.schema.statistics.TaskSynchronizationStatisticsCollectoronSynchronizationExclusion, onSynchronizationSituationChange, onSynchronizationStart, startCollectingSynchronizationStatistics, stopCollectingSynchronizationStatistics
- 
Method Details- 
createSubtask@NotNull @NotNull RunningLightweightTask createSubtask(@NotNull @NotNull LightweightTaskHandler handler) Creates a transient subtask, ready to execute a given LightweightTaskHandler. Owner is inherited from parent task to subtask.
- 
getLightweightAsynchronousSubtasksCollection<? extends RunningLightweightTask> getLightweightAsynchronousSubtasks()
- 
getRunningLightweightAsynchronousSubtasksCollection<? extends RunningLightweightTask> getRunningLightweightAsynchronousSubtasks()
- 
getRunnableOrRunningLightweightAsynchronousSubtasksCollection<? extends RunningLightweightTask> getRunnableOrRunningLightweightAsynchronousSubtasks()
- 
deleteLightweightAsynchronousSubtasksvoid deleteLightweightAsynchronousSubtasks()Precondition: there are no runnable nor running LATs
- 
getRootTaskOidTODO
- 
getRootTaskTODO EXPERIMENTAL
- 
getParentTask
- 
makeWaitingForOtherTasksChanges scheduling status to WAITING. Does not change execution state. Currently use only on transient tasks OR from within task handler.
- 
makeWaitingForOtherTasksvoid makeWaitingForOtherTasks(TaskExecutionStateType execState, TaskUnpauseActionType unpauseAction) Changes scheduling status to WAITING, and execution state to the given value. Currently use only on transient tasks OR from within task handler.
- 
getActivityExecutionModeReturns the execution mode (e.g. execute, simulate, dry run) for the current operation. This is a little hack to avoid the need of passing this information throughout the whole call tree. (Originally this was implemented in task extension.)
- 
getExecutionSupportExecutionSupport getExecutionSupport()- Specified by:
- getExecutionSupportin interface- Task
 
- 
setExecutionSupport
- 
isExcludedFromStalenessCheckingboolean isExcludedFromStalenessChecking()- Returns:
- True if this task should not be checked for staleness.
 
- 
setExcludedFromStalenessCheckingvoid setExcludedFromStalenessChecking(boolean value) Sets the "excluded from staleness checking" flag.
 
-