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
public interface RunningTask extends Task, RunningTaskStatisticsCollector, CanRunSupplier
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 Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Fields inherited from interface com.evolveum.midpoint.task.api.Task
DOT_INTERFACE
-
-
Method Summary
-
Methods inherited from interface com.evolveum.midpoint.task.api.CanRunSupplier
canRun
-
Methods inherited from interface com.evolveum.midpoint.task.api.ConnIdOperationsListener
onConnIdOperationEnd, onConnIdOperationResume, onConnIdOperationStart, onConnIdOperationSuspend
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.schema.statistics.MappingStatisticsCollector
recordMappingOperation
-
Methods inherited from interface com.evolveum.midpoint.schema.statistics.NotificationStatisticsCollector
recordNotificationOperation
-
Methods inherited from interface com.evolveum.midpoint.task.api.RunningTaskStatisticsCollector
incrementLegacyProgressAndStoreStatisticsIfTimePassed, refreshThreadLocalStatistics, restartCollectingStatisticsFromZero, setStatisticsRepoStoreInterval, startCollectingStatistics, storeStatisticsIntoRepository, storeStatisticsIntoRepositoryIfTimePassed, updateAndStoreStatisticsIntoRepository, updateOperationStatsInTaskPrism
-
Methods inherited from interface com.evolveum.midpoint.schema.statistics.StatisticsCollector
recordStateMessage
-
Methods inherited from interface com.evolveum.midpoint.task.api.Task
addArchetypeInformation, addArchetypeInformationIfMissing, addAuxiliaryArchetypeInformation, addDependent, addExtensionProperty, addExtensionReference, addTracingRequest, applyDeltasImmediate, applyModificationsTransient, createSubtask, deleteExtensionProperty, doesItemExist, flushPendingModifications, getActivitiesStateOrClone, getActivityStateOrClone, getActivityStateOrClone, getActivityTreeStateOverviewOrClone, getAggregatedLiveOperationStats, getBinding, getCachingProfiles, getCategory, getChannel, getCompletionTimestamp, getContainerableOrClone, getDependents, getDescription, getErrorHandlingStrategy, getExecutionConstraints, getExecutionEnvironment, getExecutionState, getExpectedTotal, getExtensionClone, getExtensionContainerRealValueOrClone, getExtensionItemOrClone, getExtensionOrClone, getExtensionPropertyOrClone, getExtensionPropertyRealValue, getExtensionReferenceOrClone, getGroup, getGroups, getGroupsWithLimits, getHandlerUri, getItemRealValueOrClone, getLastRunFinishTimestamp, getLastRunStartTimestamp, getLegacyProgress, getModelOperationContext, getName, getNextRunStartTime, getNode, getNodeAsObserved, getObject, getObjectOid, getObjectRefOrClone, getOid, getOrCreateExtension, getOwner, getOwnerRef, getParent, getParentAndRoot, getParentTask, getPathToRootTask, getPersistenceStatus, getPolicyRule, getPropertyRealValue, getPropertyRealValueOrClone, getRawTaskObjectClone, getRawTaskObjectClonedIfNecessary, getRecurrence, getReferenceRealValue, getReferenceRealValues, getRequestee, getResult, getResultStatus, getRoot, getRootActivityCompletionTimestamp, getRootActivityDefinitionOrClone, getSchedule, getScheduleInterval, getSchedulingState, getSelfReference, getSelfReferenceFull, getStoredOperationStatsOrClone, getTaskIdentifier, getThreadStopAction, getTracingProfile, getTracingRequestedFor, getUpdatedTaskObject, getVersion, getWaitingReason, getWorkState, hasAssignments, hasScheduleInterval, incrementLegacyProgressTransient, isAsynchronous, isClosed, isIndestructible, isLooselyBound, isPersistent, isReady, isRecurring, isRoot, isRunnable, isRunning, isSingle, isSuspended, isTightlyBound, isTransient, isWaiting, listDependents, listPrerequisiteTasks, listSubtasks, listSubtasks, listSubtasksDeeply, listSubtasksDeeply, makeSingle, modify, modify, refresh, registerConnIdOperationsListener, removeTracingRequests, setCategory, setChannel, setDescription, setDescriptionImmediate, setExecutionConstraints, setExecutionEnvironment, setExpectedTotal, setExtensionContainer, setExtensionContainerValue, setExtensionItem, setExtensionProperty, setExtensionPropertyImmediate, setExtensionPropertyValue, setExtensionReference, setHandlerUri, setInitialExecutionAndScheduledState, setInitiallyRunnable, setInitiallySuspended, setInitiallyWaitingForPrerequisites, setItemRealValues, setItemRealValuesCollection, setLegacyProgress, setLegacyProgressImmediate, setModelOperationContext, setName, setName, setNameImmediate, setObjectRef, setObjectRef, setOwner, setOwnerRef, setPropertyRealValue, setRequesteeTransient, setResult, setRootActivityDefinition, setSchedule, setThreadStopAction, setTracingProfile, unregisterConnIdOperationsListener
-
Methods inherited from interface com.evolveum.midpoint.schema.statistics.TaskActionsExecutedCollector
recordObjectActionExecuted, recordObjectActionExecuted, recordObjectActionExecuted, startCollectingActionsExecuted, stopCollectingActionsExecuted
-
Methods inherited from interface com.evolveum.midpoint.schema.statistics.TaskIterativeOperationCollector
recordIterativeOperationStart, recordIterativeOperationStart, recordIterativeOperationStart
-
Methods inherited from interface com.evolveum.midpoint.schema.statistics.TaskSynchronizationStatisticsCollector
onSynchronizationExclusion, onSynchronizationSituationChange, onSynchronizationStart, startCollectingSynchronizationStatistics, stopCollectingSynchronizationStatistics
-
-
-
-
Method Detail
-
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.
-
getLightweightAsynchronousSubtasks
Collection<? extends RunningLightweightTask> getLightweightAsynchronousSubtasks()
-
getRunningLightweightAsynchronousSubtasks
Collection<? extends RunningLightweightTask> getRunningLightweightAsynchronousSubtasks()
-
getRunnableOrRunningLightweightAsynchronousSubtasks
Collection<? extends RunningLightweightTask> getRunnableOrRunningLightweightAsynchronousSubtasks()
-
deleteLightweightAsynchronousSubtasks
void deleteLightweightAsynchronousSubtasks()
Precondition: there are no runnable nor running LATs
-
getRootTaskOid
@Experimental @NotNull @NotNull String getRootTaskOid()
TODO
-
getRootTask
@Experimental @NotNull @NotNull Task getRootTask()
TODO EXPERIMENTAL
-
getParentTask
@Experimental @Nullable @Nullable Task getParentTask()
-
makeWaitingForOtherTasks
void makeWaitingForOtherTasks(TaskUnpauseActionType unpauseAction)
Changes scheduling status to WAITING. Does not change execution state. Currently use only on transient tasks OR from within task handler.
-
makeWaitingForOtherTasks
void 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.
-
getExecutionMode
@Experimental @NotNull default @NotNull ExecutionModeType getExecutionMode()
Returns 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.)
-
getExecutionSupport
ExecutionSupport getExecutionSupport()
- Specified by:
getExecutionSupport
in interfaceTask
-
setExecutionSupport
void setExecutionSupport(ExecutionSupport executionContext)
-
isExcludedFromStalenessChecking
boolean isExcludedFromStalenessChecking()
- Returns:
- True if this task should not be checked for staleness.
-
setExcludedFromStalenessChecking
void setExcludedFromStalenessChecking(boolean value)
Sets the "excluded from staleness checking" flag.
-
-