Class NullTaskImpl
- java.lang.Object
-
- com.evolveum.midpoint.task.api.test.NullTaskImpl
-
- All Implemented Interfaces:
StatisticsCollector
,Task
,DebugDumpable
public class NullTaskImpl extends Object implements Task
DO NOT USE in production code. This is only for testing purposes: provides a no-op implementation of Task interface to be used when task-quartz-impl is not available. TODO move to src/main/test tree.- Author:
- lazyman
-
-
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
-
-
Constructor Summary
Constructors Constructor Description NullTaskImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDependent(String taskIdentifier)
Add a task as this task's dependent, i.e.void
addExtensionProperty(PrismProperty<?> property)
Adds value(s) to a given extension property.void
addExtensionReference(PrismReference reference)
Adds value(s) to a given extension reference.void
addTracingRequest(TracingRootType point)
void
close(OperationResult taskResult, boolean saveState, OperationResult parentResult)
Task
createSubtask()
Creates a transient subtask.String
debugDump()
Show the content of the object intended for diagnostics by system administrator.String
debugDump(int indent)
void
deleteDependent(String value)
Deletes a task from the list of dependents of this task.void
deleteExtensionProperty(PrismProperty<?> property)
Removes specified VALUES of this extension property (not all of its values).void
finishHandler(OperationResult parentResult)
Removes current handler from the handlers stack.void
flushPendingModifications(OperationResult parentResult)
Saves modifications done against the in-memory version of the task into the repository.OperationStatsType
getAggregatedLiveOperationStats()
Gets information from the current task and - for running task - its transient subtasks (aka worker threads).Collection<? extends AssignmentType>
getAssignments()
NEVER modify objects returned in multithreaded environments!TaskBinding
getBinding()
Returns task binding.@NotNull Collection<String>
getCachingProfiles()
String
getCategory()
Task category is a user-oriented term, hinting on what 'kind' of task is the one being considered (system task, workflow, live sync, ...).String
getChannel()
Returns change channel URI.@NotNull PrismObject<TaskType>
getClonedTaskObject()
Returns cloned task object.Long
getCompletionTimestamp()
Returns the completion timestamp - time when the task was closed (or null if it is not closed).List<String>
getDependents()
Lists all explicit dependents' identifiers.String
getDescription()
Returns task description.TaskExecutionConstraintsType
getExecutionConstraints()
TaskExecutionEnvironmentType
getExecutionEnvironment()
String
getExecutionGroup()
TaskExecutionStatus
getExecutionStatus()
Returns execution status.Long
getExpectedTotal()
Returns expected total progress.PrismContainer<? extends ExtensionType>
getExtensionClone()
<T extends Containerable>
TgetExtensionContainerRealValueOrClone(ItemName containerName)
Returns specified single-valued container real value from the extension To ensure thread safety, in the case of running tasks the returned value is a clone of the live one.<IV extends PrismValue,ID extends ItemDefinition>
Item<IV,ID>getExtensionItemOrClone(ItemName propertyName)
Returns specified item (property, reference or container) from the extension.PrismContainer<? extends ExtensionType>
getExtensionOrClone()
Returns task extension.<T> PrismProperty<T>
getExtensionPropertyOrClone(ItemName propertyName)
Returns specified property from the extension<T> T
getExtensionPropertyRealValue(ItemName propertyName)
Returns specified single-valued property real value from the extensionPrismReference
getExtensionReferenceOrClone(ItemName name)
Returns specified reference from the extension.String
getGroup()
@NotNull Collection<String>
getGroups()
@NotNull Map<String,Integer>
getGroupsWithLimits()
String
getHandlerUri()
Returns handler URI.TaskKindType
getKind()
@NotNull List<String>
getLastFailures()
Long
getLastRunFinishTimestamp()
Returns the time when the task last run was finished (or null if the task was not finished yet).Long
getLastRunStartTimestamp()
Returns the time when the task last run was started (or null if the task was never started).LensContextType
getModelOperationContext()
PolyStringType
getName()
Returns human-readable name of the task.Long
getNextRunStartTime(OperationResult parentResult)
Returns the time when the task should start again.String
getNode()
Returns the node the task is currently executing at, based on repository information.String
getNodeAsObserved()
<T extends ObjectType>
PrismObject<T>getObject(Class<T> type, OperationResult parentResult)
Returns object that the task is associated with.String
getObjectOid()
Returns OID of the object that the task is associated with.ObjectReferenceType
getObjectRefOrClone()
Returns reference to the object that the task is associated with.String
getOid()
Returns task OID.String
getOperationResultHandlingStrategyName()
@NotNull PrismContainer<? extends ExtensionType>
getOrCreateExtension()
UriStack
getOtherHandlersUriStack()
Returns the stack of other handlers URIs.PrismObject<? extends FocusType>
getOwner()
Returns user that owns this task.ObjectReferenceType
getOwnerRef()
String
getParent()
Returns the identifier of the task's parent (or null of there is no parent task).Task
getParentTask(OperationResult result)
Returns the parent task, if any.Collection<Task>
getPathToRootTask(OperationResult parentResult)
Collection<ItemDelta<?,?>>
getPendingModifications()
Returns a list of pending modifications for this task.TaskPersistenceStatus
getPersistenceStatus()
Returns task persistence status.PolicyRuleType
getPolicyRule()
Gets the policy rule defined for the task (for running task the returned value is a clone).long
getProgress()
Returns task progress, as reported by task handler.TaskRecurrence
getRecurrenceStatus()
Returns task recurrence status.PrismObject<UserType>
getRequestee()
Gets the requestee OID - typically an identification of account owner (for notifications).OperationResult
getResult()
Returns a top-level OperationResult stored in the task.OperationResultStatusType
getResultStatus()
Returns the status of top-level OperationResult stored in the task.ScheduleType
getSchedule()
Returns the schedule.Integer
getScheduleInterval()
ObjectReferenceType
getSelfReference()
TaskExecutionStatusType
getStateBeforeSuspend()
OperationStatsType
getStoredOperationStats()
String
getTaskIdentifier()
Returns task (lightweight) identifier.String
getTaskTreeId(OperationResult result)
ThreadStopActionType
getThreadStopAction()
Returns thread stop action (what happens when the task thread is stopped e.g.TracingProfileType
getTracingProfile()
@NotNull Collection<TracingRootType>
getTracingRequestedFor()
Collection<? extends TriggerType>
getTriggers()
NEVER modify objects returned in multithreaded environments!TaskUnpauseActionType
getUnpauseAction()
@NotNull PrismObject<TaskType>
getUpdatedOrClonedTaskObject()
Returns backing task prism object.@NotNull PrismObject<TaskType>
getUpdatedTaskObject()
Returns backing task prism object, provided that task is not running.String
getVersion()
TaskWaitingReason
getWaitingReason()
Returns the task waiting reason for a WAITING task.TaskWorkManagementType
getWorkManagement()
TaskWorkStateType
getWorkState()
boolean
hasExtension()
boolean
hasScheduleInterval()
boolean
isAsynchronous()
Returns true if the task is asynchronous.boolean
isClosed()
Returns true if the task is closed.boolean
isLooselyBound()
Returns true if the task is loosely bound.boolean
isPartitionedMaster()
boolean
isPersistent()
Returns true if task is persistent (i.e.boolean
isRecurring()
Checks whether the task is a cyclic (recurrent) one.boolean
isResilient()
Resilient tasks are those that survive node shutdown.boolean
isScavenger()
boolean
isSingle()
Checks whether the task is single-run.boolean
isTightlyBound()
Returns true if the task is tightly bound.boolean
isTransient()
Returns true if task is transient (i.e.List<Task>
listDependents(OperationResult result)
Lists all explicit dependents, i.e.List<Task>
listPrerequisiteTasks(OperationResult parentResult)
List all prerequisite tasks for the current tasks, i.e.@NotNull List<Task>
listSubtasks(boolean persistentOnly, OperationResult parentResult)
List<Task>
listSubtasksDeeply(boolean persistentOnly, OperationResult result)
void
makeRecurring(ScheduleType schedule)
Makes a task recurring, with a given schedule.void
makeRecurringCron(String cronLikeSpecification)
Makes a task recurring, running according to a cron-like schedule.void
makeRecurringSimple(int interval)
Makes a task recurring, running in a fixed time intervals.void
makeRunnable()
Status-changing method.void
makeSingle()
Makes a task single-run, with no particular schedule.void
makeSingle(ScheduleType schedule)
Makes a task single-run, with a given schedule.void
makeWaiting()
Status-changing method.void
makeWaiting(TaskWaitingReason reason)
Changes exec status to WAITING, with a given waiting reason.void
makeWaiting(TaskWaitingReason reason, TaskUnpauseActionType unpauseAction)
void
markObjectActionExecutedBoundary()
void
modify(ItemDelta<?,?> delta)
Changes in-memory representation immediately and schedules a corresponding batched modification.void
modify(Collection<ItemDelta<?,?>> deltas)
void
modifyAndFlush(ItemDelta<?,?> delta, OperationResult parentResult)
Changes in-memory and in-repo representations immediately.void
modifyExtension(ItemDelta itemDelta)
Modifies task extension using given delta.void
pushHandlerUri(String uri, ScheduleType schedule, TaskBinding binding)
Same as above, with no extension deltas.void
pushHandlerUri(String uri, ScheduleType schedule, TaskBinding binding, ItemDelta<?,?> delta)
Same as above, with one extension delta (not a collection of them).void
pushHandlerUri(String uri, ScheduleType schedule, TaskBinding binding, Collection<ItemDelta<?,?>> extensionDeltas)
Pushes a new handler URI onto the stack of handlers.void
recordIterativeOperationEnd(ShadowType shadow, long started, Throwable exception)
void
recordIterativeOperationEnd(String objectName, String objectDisplayName, QName objectType, String objectOid, long started, Throwable exception)
void
recordIterativeOperationStart(ShadowType shadow)
void
recordIterativeOperationStart(String objectName, String objectDisplayName, QName objectType, String objectOid)
Records information about iterative processing of objects.void
recordMappingOperation(String objectOid, String objectName, String objectTypeName, String mappingName, long duration)
void
recordNotificationOperation(String transportName, boolean success, long duration)
void
recordObjectActionExecuted(PrismObject<? extends ObjectType> object, ChangeType changeType, Throwable exception)
<T extends ObjectType>
voidrecordObjectActionExecuted(PrismObject<T> objectOld, Class<T> objectTypeClass, String oid, ChangeType delete, String channel, Throwable o)
void
recordObjectActionExecuted(String objectName, String objectDisplayName, QName objectType, String objectOid, ChangeType changeType, String channel, Throwable exception)
Records information about repository (focal) events.void
recordProvisioningOperation(String resourceOid, String resourceName, QName objectClassName, ProvisioningOperation operation, boolean success, int count, long duration)
void
recordState(String message)
Records various kinds of operational information.void
recordSynchronizationOperationEnd(ShadowType shadow, long started, Throwable exception, SynchronizationInformation.Record originalStateIncrement, SynchronizationInformation.Record newStateIncrement)
void
recordSynchronizationOperationEnd(String objectName, String objectDisplayName, QName objectType, String objectOid, long started, Throwable exception, SynchronizationInformation.Record originalStateIncrement, SynchronizationInformation.Record newStateIncrement)
void
refresh(OperationResult parentResult)
Re-reads the task state from the persistent storage.void
removeTracingRequests()
void
resetActionsExecutedInformation(ActionsExecutedInformationType value)
void
resetEnvironmentalPerformanceInformation(EnvironmentalPerformanceInformationType value)
Sets initial values for statistics.void
resetIterativeTaskInformation(IterativeTaskInformationType value)
void
resetSynchronizationInformation(SynchronizationInformationType value)
void
setBinding(TaskBinding value)
Sets the binding for this task.void
setBindingImmediate(TaskBinding value, OperationResult parentResult)
Sets the binding (immediately through to the repo).void
setCategory(String category)
Sets the task category.void
setChannel(String channelUri)
Sets change channel URI.void
setChannelImmediate(String channelUri, OperationResult parentResult)
Sets change channel URI.void
setDescription(String value)
Sets task description.void
setDescriptionImmediate(String value, OperationResult parentResult)
Sets task description, immediately storing it into the repo.void
setExecutionConstraints(TaskExecutionConstraintsType value)
void
setExecutionEnvironment(TaskExecutionEnvironmentType value)
void
setExecutionEnvironmentTransient(TaskExecutionEnvironmentType value)
void
setExpectedTotal(Long value)
Stores expected total progress of the task, storing it persistently if needed.void
setExpectedTotalImmediate(Long value, OperationResult parentResult)
"Immediate" version of the above method.<C extends Containerable>
voidsetExtensionContainer(PrismContainer<C> item)
Sets a container in the extension - replaces existing value(s), if any, by the one(s) provided.<T extends Containerable>
voidsetExtensionContainerValue(QName containerName, T value)
Sets a container value in the extension - replaces existing value(s), if any, by the one provided.void
setExtensionItem(Item item)
Puts generic item into extension.void
setExtensionProperty(PrismProperty<?> property)
Sets a property in the extension - replaces existing value(s), if any, by the one(s) provided.void
setExtensionPropertyImmediate(PrismProperty<?> property, OperationResult parentResult)
"Immediate" version of the above method.<T> void
setExtensionPropertyValue(QName propertyName, T value)
Sets (i.e., replaces) the value of the given property in task extension.<T> void
setExtensionPropertyValueTransient(QName propertyName, T value)
Sets (i.e., replaces) the value of the given property in task extension - without writing to repo.void
setExtensionReference(PrismReference reference)
Sets a reference in the extension - replaces existing value(s), if any, by the one(s) provided.void
setHandlerUri(String value)
Sets handler URI.void
setHandlerUriImmediate(String value, OperationResult parentResult)
Sets handler URI, also immediately in the repository.void
setInitialExecutionStatus(TaskExecutionStatus value)
Sets task execution status.void
setModelOperationContext(LensContextType modelOperationContext)
void
setName(PolyStringType value)
Sets the human-readable name of the task.void
setName(String value)
Sets the human-readable name of the task.void
setNameImmediate(PolyStringType value, OperationResult parentResult)
Sets the human-readable name of the task, immediately into repository.void
setObjectRef(ObjectReferenceType objectRef)
Sets the object reference.void
setObjectRef(String oid, QName type)
Sets the object reference.void
setObjectRefImmediate(ObjectReferenceType value, OperationResult parentResult)
"Immediate" version of the previous method.void
setObjectTransient(PrismObject object)
Sets the "task object" in the in-memory task representation (i.e.void
setOwner(PrismObject<? extends FocusType> owner)
Sets the task owner.void
setProgress(Long value)
Record progress of the task, storing it persistently if needed.void
setProgressImmediate(Long progress, OperationResult parentResult)
"Immediate" version of the above method.void
setProgressTransient(Long value)
void
setRequesteeTransient(PrismObject<UserType> user)
void
setResult(OperationResult result)
Sets the top-level OperationResult stored in the task.void
setResultImmediate(OperationResult result, OperationResult parentResult)
"Immediate" version of above method.void
setResultTransient(OperationResult result)
void
setThreadStopAction(ThreadStopActionType value)
Sets the thread stop action for this task.void
setTracingProfile(TracingProfileType tracingProfile)
void
startWaitingForTasksImmediate(OperationResult result)
Starts "passive" waiting for other tasks.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.task.api.Task
hasAssignments, listSubtasks, listSubtasksDeeply
-
-
-
-
Method Detail
-
addDependent
public void addDependent(String taskIdentifier)
Description copied from interface:Task
Add a task as this task's dependent, i.e. the task denoted by taskIdentifier DEPENDS ON (waits for completion of) this task.- Specified by:
addDependent
in interfaceTask
-
isAsynchronous
public boolean isAsynchronous()
Description copied from interface:Task
Returns true if the task is asynchronous. The asynchronous task is not executing in foreground. Therefore any thread that is not explicitly allocated for the task can be discarded. E.g. if a GUI thread detects that the task is asynchronous it knows that there is no point in waiting for the task result. It can just display appropriate message to the user (e.g. "please come back later") and return control back to the web container. Usually, asynchronous means the same as persistent. However, there can are lightweight tasks that are asynchronous but not stored in repository.- Specified by:
isAsynchronous
in interfaceTask
- Returns:
- true if the task is asynchronous.
-
getExecutionStatus
public TaskExecutionStatus getExecutionStatus()
Description copied from interface:Task
Returns execution status.- Specified by:
getExecutionStatus
in interfaceTask
- Returns:
- execution status.
- See Also:
TaskExecutionStatus
-
makeWaiting
public void makeWaiting()
Description copied from interface:Task
Status-changing method. It changes task's execution status to WAITING. Currently use only on transient tasks, on suspended tasks or from within task handler.- Specified by:
makeWaiting
in interfaceTask
-
makeRunnable
public void makeRunnable()
Description copied from interface:Task
Status-changing method. It changes task's execution status to RUNNABLE. Currently use ONLY on transient tasks.- Specified by:
makeRunnable
in interfaceTask
-
setInitialExecutionStatus
public void setInitialExecutionStatus(TaskExecutionStatus value)
Description copied from interface:Task
Sets task execution status. Can be used only for transient tasks (for safety reasons). However, it is better to use specific state-changing methods (makeWaiting, makeRunnable, ...).- Specified by:
setInitialExecutionStatus
in interfaceTask
- Parameters:
value
- new task execution status.- See Also:
TaskExecutionStatus
-
getPersistenceStatus
public TaskPersistenceStatus getPersistenceStatus()
Description copied from interface:Task
Returns task persistence status.- Specified by:
getPersistenceStatus
in interfaceTask
- Returns:
- task persistence status.
- See Also:
TaskPersistenceStatus
-
isTransient
public boolean isTransient()
Description copied from interface:Task
Returns true if task is transient (i.e. not stored in repository).- Specified by:
isTransient
in interfaceTask
-
isPersistent
public boolean isPersistent()
Description copied from interface:Task
Returns true if task is persistent (i.e. stored in repository).- Specified by:
isPersistent
in interfaceTask
-
getRecurrenceStatus
public TaskRecurrence getRecurrenceStatus()
Description copied from interface:Task
Returns task recurrence status.- Specified by:
getRecurrenceStatus
in interfaceTask
- Returns:
- task recurrence status
-
isSingle
public boolean isSingle()
Description copied from interface:Task
Checks whether the task is single-run.
-
isRecurring
public boolean isRecurring()
Description copied from interface:Task
Checks whether the task is a cyclic (recurrent) one.- Specified by:
isRecurring
in interfaceTask
-
getSchedule
public ScheduleType getSchedule()
Description copied from interface:Task
Returns the schedule.- Specified by:
getSchedule
in interfaceTask
-
getScheduleInterval
public Integer getScheduleInterval()
- Specified by:
getScheduleInterval
in interfaceTask
-
hasScheduleInterval
public boolean hasScheduleInterval()
- Specified by:
hasScheduleInterval
in interfaceTask
-
getBinding
public TaskBinding getBinding()
Description copied from interface:Task
Returns task binding.- Specified by:
getBinding
in interfaceTask
-
isTightlyBound
public boolean isTightlyBound()
Description copied from interface:Task
Returns true if the task is tightly bound.- Specified by:
isTightlyBound
in interfaceTask
-
isLooselyBound
public boolean isLooselyBound()
Description copied from interface:Task
Returns true if the task is loosely bound.- Specified by:
isLooselyBound
in interfaceTask
-
setBinding
public void setBinding(TaskBinding value)
Description copied from interface:Task
Sets the binding for this task.- Specified by:
setBinding
in interfaceTask
-
setBindingImmediate
public void setBindingImmediate(TaskBinding value, OperationResult parentResult)
Description copied from interface:Task
Sets the binding (immediately through to the repo).- Specified by:
setBindingImmediate
in interfaceTask
-
getHandlerUri
public String getHandlerUri()
Description copied from interface:Task
Returns handler URI. Handler URI indirectly specifies which class is responsible to handle the task. The handler will execute reaction to a task lifecycle events such as executing the task, task heartbeat, etc.- Specified by:
getHandlerUri
in interfaceTask
- Returns:
- handler URI
-
setHandlerUri
public void setHandlerUri(String value)
Description copied from interface:Task
Sets handler URI. Handler URI indirectly specifies which class is responsible to handle the task. The handler will execute reaction to a task lifecycle events such as executing the task, task heartbeat, etc.- Specified by:
setHandlerUri
in interfaceTask
- Parameters:
value
- new handler URI
-
setHandlerUriImmediate
public void setHandlerUriImmediate(String value, OperationResult parentResult)
Description copied from interface:Task
Sets handler URI, also immediately in the repository.- Specified by:
setHandlerUriImmediate
in interfaceTask
-
getOtherHandlersUriStack
public UriStack getOtherHandlersUriStack()
Description copied from interface:Task
Returns the stack of other handlers URIs. The idea is that a task may have a chain of handlers, forming a stack. After a handler at the top of the stack finishes its processing, TaskManager will remove it from the stack and invoke the then-current handler. After that finishes, the next handler will be called, and so on, until the stack is empty.- Specified by:
getOtherHandlersUriStack
in interfaceTask
-
getTaskIdentifier
public String getTaskIdentifier()
Description copied from interface:Task
Returns task (lightweight) identifier. This is an unique identification of any task, regardless whether it is persistent or transient (cf. OID). Therefore this can be used to identify all tasks, e.g. for the purposes of auditing and logging. Task identifier is assigned automatically when the task is created. It is immutable.- Specified by:
getTaskIdentifier
in interfaceTask
- Returns:
- task (lightweight) identifier
-
getOwner
public PrismObject<? extends FocusType> getOwner()
Description copied from interface:Task
Returns user that owns this task. It usually means the user that started the task or a system used that is used to execute the task. The owner will be used to determine access rights of the task, will be used for auditing, etc.
-
setOwner
public void setOwner(PrismObject<? extends FocusType> owner)
Description copied from interface:Task
Sets the task owner. BEWARE: sets the owner only for in-memory information. So do not call this method for persistent tasks! (until fixed)
-
getChannel
public String getChannel()
Description copied from interface:Task
Returns change channel URI.- Specified by:
getChannel
in interfaceTask
-
setChannel
public void setChannel(String channelUri)
Description copied from interface:Task
Sets change channel URI.- Specified by:
setChannel
in interfaceTask
-
setChannelImmediate
public void setChannelImmediate(String channelUri, OperationResult parentResult)
Description copied from interface:Task
Sets change channel URI.- Specified by:
setChannelImmediate
in interfaceTask
-
getRequestee
public PrismObject<UserType> getRequestee()
Description copied from interface:Task
Gets the requestee OID - typically an identification of account owner (for notifications). Serves for communication between model and provisioning. It is a temporary feature - will be removed in midPoint 2.3.- Specified by:
getRequestee
in interfaceTask
-
setRequesteeTransient
public void setRequesteeTransient(PrismObject<UserType> user)
- Specified by:
setRequesteeTransient
in interfaceTask
-
getModelOperationContext
public LensContextType getModelOperationContext()
- Specified by:
getModelOperationContext
in interfaceTask
-
setModelOperationContext
public void setModelOperationContext(LensContextType modelOperationContext)
- Specified by:
setModelOperationContext
in interfaceTask
-
getOid
public String getOid()
Description copied from interface:Task
Returns task OID. Only persistent tasks have OID. This returns null if the task is not persistent.
-
getObject
public <T extends ObjectType> PrismObject<T> getObject(Class<T> type, OperationResult parentResult)
Description copied from interface:Task
Returns object that the task is associated with. Tasks may be associated with a particular objects. For example a "import from resource" task is associated with the resource definition object that it imports from. Similarly for synchronization and reconciliation tasks (cycles). User approval and modification task may be associated with that user. This is an optional property. The object will only be returned if the task really contains an object without OID (e.g. unfinished account shadow). In all other cases this method may return null. Use getObjectRefOrClone instead. Optional. May return null.
-
getObjectRefOrClone
public ObjectReferenceType getObjectRefOrClone()
Description copied from interface:Task
Returns reference to the object that the task is associated with. Tasks may be associated with a particular objects. For example a "import from resource" task is associated with the resource definition object that it imports from. Similarly for synchronization and reconciliation tasks (cycles). This is an optional property.- Specified by:
getObjectRefOrClone
in interfaceTask
-
setObjectRef
public void setObjectRef(ObjectReferenceType objectRef)
Description copied from interface:Task
Sets the object reference.- Specified by:
setObjectRef
in interfaceTask
-
setObjectRef
public void setObjectRef(String oid, QName type)
Description copied from interface:Task
Sets the object reference.- Specified by:
setObjectRef
in interfaceTask
-
setObjectTransient
public void setObjectTransient(PrismObject object)
Description copied from interface:Task
Sets the "task object" in the in-memory task representation (i.e. not in the repo).- Specified by:
setObjectTransient
in interfaceTask
-
getObjectOid
public String getObjectOid()
Description copied from interface:Task
Returns OID of the object that the task is associated with. Convenience method. This will get the OID from the objectRef.- Specified by:
getObjectOid
in interfaceTask
-
getResult
public OperationResult getResult()
Description copied from interface:Task
Returns a top-level OperationResult stored in the task. Beware of thread safety. This is a live object!
-
setResultTransient
public void setResultTransient(OperationResult result)
- Specified by:
setResultTransient
in interfaceTask
-
setResult
public void setResult(OperationResult result)
Description copied from interface:Task
Sets the top-level OperationResult stored in the task.
-
setResultImmediate
public void setResultImmediate(OperationResult result, OperationResult parentResult)
Description copied from interface:Task
"Immediate" version of above method.- Specified by:
setResultImmediate
in interfaceTask
-
getLastRunStartTimestamp
public Long getLastRunStartTimestamp()
Description copied from interface:Task
Returns the time when the task last run was started (or null if the task was never started).- Specified by:
getLastRunStartTimestamp
in interfaceTask
-
getLastRunFinishTimestamp
public Long getLastRunFinishTimestamp()
Description copied from interface:Task
Returns the time when the task last run was finished (or null if the task was not finished yet).- Specified by:
getLastRunFinishTimestamp
in interfaceTask
-
getNextRunStartTime
public Long getNextRunStartTime(OperationResult parentResult)
Description copied from interface:Task
Returns the time when the task should start again.- Specified by:
getNextRunStartTime
in interfaceTask
-
getName
public PolyStringType getName()
Description copied from interface:Task
Returns human-readable name of the task.
-
setName
public void setName(PolyStringType value)
Description copied from interface:Task
Sets the human-readable name of the task.
-
setName
public void setName(String value)
Description copied from interface:Task
Sets the human-readable name of the task.
-
setNameImmediate
public void setNameImmediate(PolyStringType value, OperationResult parentResult)
Description copied from interface:Task
Sets the human-readable name of the task, immediately into repository.- Specified by:
setNameImmediate
in interfaceTask
-
getExtensionItemOrClone
public <IV extends PrismValue,ID extends ItemDefinition> Item<IV,ID> getExtensionItemOrClone(ItemName propertyName)
Description copied from interface:Task
Returns specified item (property, reference or container) from the extension.- Specified by:
getExtensionItemOrClone
in interfaceTask
- Returns:
- null if extension or item does not exist To maintain thread safety, for running tasks returns a clone of the original item.
-
setExtensionContainer
public <C extends Containerable> void setExtensionContainer(PrismContainer<C> item)
Description copied from interface:Task
Sets a container in the extension - replaces existing value(s), if any, by the one(s) provided.- Specified by:
setExtensionContainer
in interfaceTask
- Parameters:
item
- Container with value(s) to be put into task extension.
-
setExtensionReference
public void setExtensionReference(PrismReference reference)
Description copied from interface:Task
Sets a reference in the extension - replaces existing value(s), if any, by the one(s) provided.- Specified by:
setExtensionReference
in interfaceTask
-
setExtensionProperty
public void setExtensionProperty(PrismProperty<?> property)
Description copied from interface:Task
Sets a property in the extension - replaces existing value(s), if any, by the one(s) provided.- Specified by:
setExtensionProperty
in interfaceTask
-
setExtensionPropertyImmediate
public void setExtensionPropertyImmediate(PrismProperty<?> property, OperationResult parentResult)
Description copied from interface:Task
"Immediate" version of the above method.- Specified by:
setExtensionPropertyImmediate
in interfaceTask
-
addExtensionProperty
public void addExtensionProperty(PrismProperty<?> property)
Description copied from interface:Task
Adds value(s) to a given extension property.- Specified by:
addExtensionProperty
in interfaceTask
- Parameters:
property
- holder of the value(s) to be added into task extension property
-
setExtensionPropertyValue
public <T> void setExtensionPropertyValue(QName propertyName, T value)
Description copied from interface:Task
Sets (i.e., replaces) the value of the given property in task extension.- Specified by:
setExtensionPropertyValue
in interfaceTask
- Parameters:
propertyName
- name of the propertyvalue
- value of the property
-
setExtensionPropertyValueTransient
public <T> void setExtensionPropertyValueTransient(QName propertyName, T value)
Description copied from interface:Task
Sets (i.e., replaces) the value of the given property in task extension - without writing to repo.- Specified by:
setExtensionPropertyValueTransient
in interfaceTask
- Parameters:
propertyName
- name of the propertyvalue
- value of the property
-
setExtensionContainerValue
public <T extends Containerable> void setExtensionContainerValue(QName containerName, T value)
Description copied from interface:Task
Sets a container value in the extension - replaces existing value(s), if any, by the one provided.- Specified by:
setExtensionContainerValue
in interfaceTask
- Parameters:
containerName
- name of the containervalue
- value to be put into extension
-
setExtensionItem
public void setExtensionItem(Item item)
Description copied from interface:Task
Puts generic item into extension.- Specified by:
setExtensionItem
in interfaceTask
-
modifyExtension
public void modifyExtension(ItemDelta itemDelta)
Description copied from interface:Task
Modifies task extension using given delta.- Specified by:
modifyExtension
in interfaceTask
-
getProgress
public long getProgress()
Description copied from interface:Task
Returns task progress, as reported by task handler.- Specified by:
getProgress
in interfaceTask
-
setProgress
public void setProgress(Long value)
Description copied from interface:Task
Record progress of the task, storing it persistently if needed.- Specified by:
setProgress
in interfaceTask
-
setProgressImmediate
public void setProgressImmediate(Long progress, OperationResult parentResult)
Description copied from interface:Task
"Immediate" version of the above method.- Specified by:
setProgressImmediate
in interfaceTask
-
setProgressTransient
public void setProgressTransient(Long value)
- Specified by:
setProgressTransient
in interfaceTask
-
getUpdatedOrClonedTaskObject
@NotNull public @NotNull PrismObject<TaskType> getUpdatedOrClonedTaskObject()
Description copied from interface:Task
Returns backing task prism object. AVOID use of this method if possible. - for regular tasks it has to update operation result in the prism object (might be costly) - for running tasks it provides a clone of the actual prism object (even more costly and leads to lost changes if the returned value is changed)- Specified by:
getUpdatedOrClonedTaskObject
in interfaceTask
-
getUpdatedTaskObject
@NotNull public @NotNull PrismObject<TaskType> getUpdatedTaskObject()
Description copied from interface:Task
Returns backing task prism object, provided that task is not running. Beware that the task operation result is updated (might be costly).- Specified by:
getUpdatedTaskObject
in interfaceTask
-
getClonedTaskObject
@NotNull public @NotNull PrismObject<TaskType> getClonedTaskObject()
Description copied from interface:Task
Returns cloned task object.- Specified by:
getClonedTaskObject
in interfaceTask
-
refresh
public void refresh(OperationResult parentResult)
Description copied from interface:Task
Re-reads the task state from the persistent storage. The task state may be synchronized with the repository all the time. But the specified timing is implementation-specific. Call to this method will make sure that the task contains fresh data. This has no effect on transient tasks.
-
debugDump
public String debugDump()
Description copied from interface:DebugDumpable
Show the content of the object intended for diagnostics by system administrator. The out put should be suitable to use in system logs at "debug" level. It may be multi-line, but in that case it should be well indented and quite terse. As it is intended to be used by system administrator, it should not use any developer terms such as class names, exceptions or stack traces.- Specified by:
debugDump
in interfaceDebugDumpable
- Returns:
- content of the object intended for diagnostics by system administrator.
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
flushPendingModifications
public void flushPendingModifications(OperationResult parentResult)
Description copied from interface:Task
Saves modifications done against the in-memory version of the task into the repository.- Specified by:
flushPendingModifications
in interfaceTask
-
getCategory
public String getCategory()
Description copied from interface:Task
Task category is a user-oriented term, hinting on what 'kind' of task is the one being considered (system task, workflow, live sync, ...). In most cases, category can be derived from the task handler. Category can be set directly; but if not set directly, it is set automatically on first task execution, determined based on task handler URI. List of categories is in the TaskCategory class.- Specified by:
getCategory
in interfaceTask
-
makeRecurringSimple
public void makeRecurringSimple(int interval)
Description copied from interface:Task
Makes a task recurring, running in a fixed time intervals.- Specified by:
makeRecurringSimple
in interfaceTask
- Parameters:
interval
- interval to run the task (in seconds)
-
makeRecurringCron
public void makeRecurringCron(String cronLikeSpecification)
Description copied from interface:Task
Makes a task recurring, running according to a cron-like schedule.- Specified by:
makeRecurringCron
in interfaceTask
- Parameters:
cronLikeSpecification
- schedule specification
-
makeSingle
public void makeSingle()
Description copied from interface:Task
Makes a task single-run, with no particular schedule.- Specified by:
makeSingle
in interfaceTask
-
getNode
public String getNode()
Description copied from interface:Task
Returns the node the task is currently executing at, based on repository information. This is present in all cases, however, it might be out-of-date, e.g. when node crashes.
-
getNodeAsObserved
public String getNodeAsObserved()
- Specified by:
getNodeAsObserved
in interfaceTask
-
getResultStatus
public OperationResultStatusType getResultStatus()
Description copied from interface:Task
Returns the status of top-level OperationResult stored in the task.- Specified by:
getResultStatus
in interfaceTask
- Returns:
- task operation result status
-
getThreadStopAction
public ThreadStopActionType getThreadStopAction()
Description copied from interface:Task
Returns thread stop action (what happens when the task thread is stopped e.g. because of node going down).- Specified by:
getThreadStopAction
in interfaceTask
-
isResilient
public boolean isResilient()
Description copied from interface:Task
Resilient tasks are those that survive node shutdown. I.e. their ThreadStopAction is either 'restart' or 'reschedule'.- Specified by:
isResilient
in interfaceTask
-
setCategory
public void setCategory(String category)
Description copied from interface:Task
Sets the task category.- Specified by:
setCategory
in interfaceTask
-
getExtensionOrClone
public PrismContainer<? extends ExtensionType> getExtensionOrClone()
Description copied from interface:Task
Returns task extension. The extension is a part of task that can store arbitrary data. It usually holds data specific to a task type, internal task state, business state or similar data that are out of scope of this interface definition. To maintain thread safety, for RunningTask this method returns extension clone. (So don't use the return value to modify the task extension if not sure whether the task is running.)- Specified by:
getExtensionOrClone
in interfaceTask
- Returns:
- task extension
-
getOrCreateExtension
@NotNull public @NotNull PrismContainer<? extends ExtensionType> getOrCreateExtension()
- Specified by:
getOrCreateExtension
in interfaceTask
-
getExtensionClone
public PrismContainer<? extends ExtensionType> getExtensionClone()
- Specified by:
getExtensionClone
in interfaceTask
-
hasExtension
public boolean hasExtension()
- Specified by:
hasExtension
in interfaceTask
-
getExtensionPropertyOrClone
public <T> PrismProperty<T> getExtensionPropertyOrClone(ItemName propertyName)
Description copied from interface:Task
Returns specified property from the extension- Specified by:
getExtensionPropertyOrClone
in interfaceTask
- Returns:
- null if extension or property does not exist.
-
getExtensionPropertyRealValue
public <T> T getExtensionPropertyRealValue(ItemName propertyName)
Description copied from interface:Task
Returns specified single-valued property real value from the extension- Specified by:
getExtensionPropertyRealValue
in interfaceTask
- Returns:
- null if extension or property does not exist.
-
getExtensionContainerRealValueOrClone
public <T extends Containerable> T getExtensionContainerRealValueOrClone(ItemName containerName)
Description copied from interface:Task
Returns specified single-valued container real value from the extension To ensure thread safety, in the case of running tasks the returned value is a clone of the live one.- Specified by:
getExtensionContainerRealValueOrClone
in interfaceTask
- Returns:
- null if extension or container does not exist.
-
getExtensionReferenceOrClone
public PrismReference getExtensionReferenceOrClone(ItemName name)
Description copied from interface:Task
Returns specified reference from the extension.- Specified by:
getExtensionReferenceOrClone
in interfaceTask
- Returns:
- null if extension or reference does not exist.
-
setDescriptionImmediate
public void setDescriptionImmediate(String value, OperationResult parentResult)
Description copied from interface:Task
Sets task description, immediately storing it into the repo.- Specified by:
setDescriptionImmediate
in interfaceTask
-
setDescription
public void setDescription(String value)
Description copied from interface:Task
Sets task description.- Specified by:
setDescription
in interfaceTask
-
getDescription
public String getDescription()
Description copied from interface:Task
Returns task description.- Specified by:
getDescription
in interfaceTask
-
deleteExtensionProperty
public void deleteExtensionProperty(PrismProperty<?> property)
Description copied from interface:Task
Removes specified VALUES of this extension property (not all of its values).- Specified by:
deleteExtensionProperty
in interfaceTask
-
setThreadStopAction
public void setThreadStopAction(ThreadStopActionType value)
Description copied from interface:Task
Sets the thread stop action for this task.- Specified by:
setThreadStopAction
in interfaceTask
-
makeRecurring
public void makeRecurring(ScheduleType schedule)
Description copied from interface:Task
Makes a task recurring, with a given schedule.- Specified by:
makeRecurring
in interfaceTask
-
makeSingle
public void makeSingle(ScheduleType schedule)
Description copied from interface:Task
Makes a task single-run, with a given schedule.- Specified by:
makeSingle
in interfaceTask
-
createSubtask
public Task createSubtask()
Description copied from interface:Task
Creates a transient subtask. Owner is inherited from parent task to subtask.- Specified by:
createSubtask
in interfaceTask
-
getParent
public String getParent()
Description copied from interface:Task
Returns the identifier of the task's parent (or null of there is no parent task).
-
pushHandlerUri
public void pushHandlerUri(String uri, ScheduleType schedule, TaskBinding binding)
Description copied from interface:Task
Same as above, with no extension deltas.- Specified by:
pushHandlerUri
in interfaceTask
-
pushHandlerUri
public void pushHandlerUri(String uri, ScheduleType schedule, TaskBinding binding, Collection<ItemDelta<?,?>> extensionDeltas)
Description copied from interface:Task
Pushes a new handler URI onto the stack of handlers. This means that the provided handler URI becomes the current one. Current one becomes the first one on the stack of other handlers, etc. So the newly added handler will be started FIRST. Care must be taken not to interfere with the execution of a task handler. It is recommended to call this method when it is sure that no handler is executing. Alongwith URI, other information are set, namely schedule, binding, and parameters that will be put into task extension when the handler URI will be invoked.- Specified by:
pushHandlerUri
in interfaceTask
- Parameters:
uri
- Handler URI to be put onto the stack.schedule
- Schedule to be used to run the handler.binding
- Binding to be used to run the handler.extensionDeltas
- The feature is EXPERIMENTAL, do not use if not absolutely necessary.
-
pushHandlerUri
public void pushHandlerUri(String uri, ScheduleType schedule, TaskBinding binding, ItemDelta<?,?> delta)
Description copied from interface:Task
Same as above, with one extension delta (not a collection of them).- Specified by:
pushHandlerUri
in interfaceTask
delta
- EXPERIMENTAL, do not use if not absolutely necessary.
-
finishHandler
public void finishHandler(OperationResult parentResult)
Description copied from interface:Task
Removes current handler from the handlers stack. Closes task if that was the last handler. USE WITH CARE. Normally, this is used implicitly in the task execution routine and there's no need for you to call this from your code.- Specified by:
finishHandler
in interfaceTask
-
listSubtasks
@NotNull public @NotNull List<Task> listSubtasks(boolean persistentOnly, OperationResult parentResult)
- Specified by:
listSubtasks
in interfaceTask
-
listPrerequisiteTasks
public List<Task> listPrerequisiteTasks(OperationResult parentResult)
Description copied from interface:Task
List all prerequisite tasks for the current tasks, i.e. tasks that must complete before this one can proceed. If A is on the list of prerequisities of B (THIS), it means that B is on list of dependents of A (i.e. B waits for A to complete). Again, implicit prerequisities (children) are not listed here.- Specified by:
listPrerequisiteTasks
in interfaceTask
-
startWaitingForTasksImmediate
public void startWaitingForTasksImmediate(OperationResult result)
Description copied from interface:Task
Starts "passive" waiting for other tasks. Precondition: The task must already be in WAITING state. Postcondition: If there are any tasks to wait for, task remains in WAITING/OTHER_TASKS state. However, if there are no tasks to wait for, task is either unpaused (if there is any handler) or closed (if there is not). Passive waiting consists of putting the task into WAITING/OTHER_TASKS state. Unpausing it is the responsibility of task manager - it does it when any of prerequisite tasks closes. At that moment, task manager checks all dependent tasks (explicit or implicit) of the closing task, and unpauses these, which can be unpaused.- Specified by:
startWaitingForTasksImmediate
in interfaceTask
-
getDependents
public List<String> getDependents()
Description copied from interface:Task
Lists all explicit dependents' identifiers.- Specified by:
getDependents
in interfaceTask
-
deleteDependent
public void deleteDependent(String value)
Description copied from interface:Task
Deletes a task from the list of dependents of this task.- Specified by:
deleteDependent
in interfaceTask
-
listDependents
public List<Task> listDependents(OperationResult result)
Description copied from interface:Task
Lists all explicit dependents, i.e. tasks that wait for the completion of this tasks (that depend on it). Implicit dependents, i.e. task's parent, grandparent, etc are NOT listed here.- Specified by:
listDependents
in interfaceTask
-
getParentTask
public Task getParentTask(OperationResult result)
Description copied from interface:Task
Returns the parent task, if any.- Specified by:
getParentTask
in interfaceTask
-
getWaitingReason
public TaskWaitingReason getWaitingReason()
Description copied from interface:Task
Returns the task waiting reason for a WAITING task.- Specified by:
getWaitingReason
in interfaceTask
-
isClosed
public boolean isClosed()
Description copied from interface:Task
Returns true if the task is closed.
-
makeWaiting
public void makeWaiting(TaskWaitingReason reason)
Description copied from interface:Task
Changes exec status to WAITING, with a given waiting reason. Currently use only on transient tasks or from within task handler.- Specified by:
makeWaiting
in interfaceTask
-
makeWaiting
public void makeWaiting(TaskWaitingReason reason, TaskUnpauseActionType unpauseAction)
- Specified by:
makeWaiting
in interfaceTask
-
getCompletionTimestamp
public Long getCompletionTimestamp()
Description copied from interface:Task
Returns the completion timestamp - time when the task was closed (or null if it is not closed).- Specified by:
getCompletionTimestamp
in interfaceTask
-
setObjectRefImmediate
public void setObjectRefImmediate(ObjectReferenceType value, OperationResult parentResult)
Description copied from interface:Task
"Immediate" version of the previous method.- Specified by:
setObjectRefImmediate
in interfaceTask
-
addExtensionReference
public void addExtensionReference(PrismReference reference)
Description copied from interface:Task
Adds value(s) to a given extension reference.- Specified by:
addExtensionReference
in interfaceTask
- Parameters:
reference
- holder of the value(s) to be added into task extension reference
-
listSubtasksDeeply
public List<Task> listSubtasksDeeply(boolean persistentOnly, OperationResult result)
- Specified by:
listSubtasksDeeply
in interfaceTask
-
getPendingModifications
public Collection<ItemDelta<?,?>> getPendingModifications()
Description copied from interface:Task
Returns a list of pending modifications for this task.- Specified by:
getPendingModifications
in interfaceTask
-
getPolicyRule
public PolicyRuleType getPolicyRule()
Description copied from interface:Task
Gets the policy rule defined for the task (for running task the returned value is a clone).- Specified by:
getPolicyRule
in interfaceTask
-
getExpectedTotal
public Long getExpectedTotal()
Description copied from interface:Task
Returns expected total progress.- Specified by:
getExpectedTotal
in interfaceTask
-
setExpectedTotal
public void setExpectedTotal(Long value)
Description copied from interface:Task
Stores expected total progress of the task, storing it persistently if needed.- Specified by:
setExpectedTotal
in interfaceTask
-
setExpectedTotalImmediate
public void setExpectedTotalImmediate(Long value, OperationResult parentResult)
Description copied from interface:Task
"Immediate" version of the above method.- Specified by:
setExpectedTotalImmediate
in interfaceTask
-
recordState
public void recordState(String message)
Description copied from interface:StatisticsCollector
Records various kinds of operational information.- Specified by:
recordState
in interfaceStatisticsCollector
-
recordProvisioningOperation
public void recordProvisioningOperation(String resourceOid, String resourceName, QName objectClassName, ProvisioningOperation operation, boolean success, int count, long duration)
- Specified by:
recordProvisioningOperation
in interfaceStatisticsCollector
-
recordNotificationOperation
public void recordNotificationOperation(String transportName, boolean success, long duration)
- Specified by:
recordNotificationOperation
in interfaceStatisticsCollector
-
recordMappingOperation
public void recordMappingOperation(String objectOid, String objectName, String objectTypeName, String mappingName, long duration)
- Specified by:
recordMappingOperation
in interfaceStatisticsCollector
-
recordSynchronizationOperationEnd
public void recordSynchronizationOperationEnd(String objectName, String objectDisplayName, QName objectType, String objectOid, long started, Throwable exception, SynchronizationInformation.Record originalStateIncrement, SynchronizationInformation.Record newStateIncrement)
- Specified by:
recordSynchronizationOperationEnd
in interfaceStatisticsCollector
-
recordSynchronizationOperationEnd
public void recordSynchronizationOperationEnd(ShadowType shadow, long started, Throwable exception, SynchronizationInformation.Record originalStateIncrement, SynchronizationInformation.Record newStateIncrement)
- Specified by:
recordSynchronizationOperationEnd
in interfaceStatisticsCollector
-
resetEnvironmentalPerformanceInformation
public void resetEnvironmentalPerformanceInformation(EnvironmentalPerformanceInformationType value)
Description copied from interface:StatisticsCollector
Sets initial values for statistics.- Specified by:
resetEnvironmentalPerformanceInformation
in interfaceStatisticsCollector
-
resetSynchronizationInformation
public void resetSynchronizationInformation(SynchronizationInformationType value)
- Specified by:
resetSynchronizationInformation
in interfaceStatisticsCollector
-
resetIterativeTaskInformation
public void resetIterativeTaskInformation(IterativeTaskInformationType value)
- Specified by:
resetIterativeTaskInformation
in interfaceStatisticsCollector
-
recordIterativeOperationEnd
public void recordIterativeOperationEnd(String objectName, String objectDisplayName, QName objectType, String objectOid, long started, Throwable exception)
- Specified by:
recordIterativeOperationEnd
in interfaceStatisticsCollector
-
recordIterativeOperationStart
public void recordIterativeOperationStart(String objectName, String objectDisplayName, QName objectType, String objectOid)
Description copied from interface:StatisticsCollector
Records information about iterative processing of objects.- Specified by:
recordIterativeOperationStart
in interfaceStatisticsCollector
-
recordIterativeOperationEnd
public void recordIterativeOperationEnd(ShadowType shadow, long started, Throwable exception)
- Specified by:
recordIterativeOperationEnd
in interfaceStatisticsCollector
-
recordIterativeOperationStart
public void recordIterativeOperationStart(ShadowType shadow)
- Specified by:
recordIterativeOperationStart
in interfaceStatisticsCollector
-
recordObjectActionExecuted
public void recordObjectActionExecuted(String objectName, String objectDisplayName, QName objectType, String objectOid, ChangeType changeType, String channel, Throwable exception)
Description copied from interface:StatisticsCollector
Records information about repository (focal) events.- Specified by:
recordObjectActionExecuted
in interfaceStatisticsCollector
-
resetActionsExecutedInformation
public void resetActionsExecutedInformation(ActionsExecutedInformationType value)
- Specified by:
resetActionsExecutedInformation
in interfaceStatisticsCollector
-
recordObjectActionExecuted
public void recordObjectActionExecuted(PrismObject<? extends ObjectType> object, ChangeType changeType, Throwable exception)
- Specified by:
recordObjectActionExecuted
in interfaceStatisticsCollector
-
recordObjectActionExecuted
public <T extends ObjectType> void recordObjectActionExecuted(PrismObject<T> objectOld, Class<T> objectTypeClass, String oid, ChangeType delete, String channel, Throwable o)
- Specified by:
recordObjectActionExecuted
in interfaceStatisticsCollector
-
markObjectActionExecutedBoundary
public void markObjectActionExecutedBoundary()
- Specified by:
markObjectActionExecutedBoundary
in interfaceStatisticsCollector
-
getStoredOperationStats
public OperationStatsType getStoredOperationStats()
- Specified by:
getStoredOperationStats
in interfaceTask
-
modify
public void modify(ItemDelta<?,?> delta)
Description copied from interface:Task
Changes in-memory representation immediately and schedules a corresponding batched modification.
-
modify
public void modify(Collection<ItemDelta<?,?>> deltas)
-
modifyAndFlush
public void modifyAndFlush(ItemDelta<?,?> delta, OperationResult parentResult)
Description copied from interface:Task
Changes in-memory and in-repo representations immediately.- Specified by:
modifyAndFlush
in interfaceTask
-
getExecutionConstraints
public TaskExecutionConstraintsType getExecutionConstraints()
- Specified by:
getExecutionConstraints
in interfaceTask
-
getGroups
@NotNull public @NotNull Collection<String> getGroups()
-
getGroupsWithLimits
@NotNull public @NotNull Map<String,Integer> getGroupsWithLimits()
- Specified by:
getGroupsWithLimits
in interfaceTask
-
getLastFailures
@NotNull public @NotNull List<String> getLastFailures()
- Specified by:
getLastFailures
in interfaceStatisticsCollector
-
close
public void close(OperationResult taskResult, boolean saveState, OperationResult parentResult)
-
getWorkManagement
public TaskWorkManagementType getWorkManagement()
- Specified by:
getWorkManagement
in interfaceTask
-
getWorkState
public TaskWorkStateType getWorkState()
- Specified by:
getWorkState
in interfaceTask
-
getUnpauseAction
public TaskUnpauseActionType getUnpauseAction()
- Specified by:
getUnpauseAction
in interfaceTask
-
getStateBeforeSuspend
public TaskExecutionStatusType getStateBeforeSuspend()
- Specified by:
getStateBeforeSuspend
in interfaceTask
-
isPartitionedMaster
public boolean isPartitionedMaster()
- Specified by:
isPartitionedMaster
in interfaceTask
-
getKind
public TaskKindType getKind()
-
getExecutionGroup
public String getExecutionGroup()
- Specified by:
getExecutionGroup
in interfaceTask
-
getAggregatedLiveOperationStats
public OperationStatsType getAggregatedLiveOperationStats()
Description copied from interface:Task
Gets information from the current task and - for running task - its transient subtasks (aka worker threads).- Specified by:
getAggregatedLiveOperationStats
in interfaceTask
-
getSelfReference
public ObjectReferenceType getSelfReference()
- Specified by:
getSelfReference
in interfaceTask
-
getVersion
public String getVersion()
- Specified by:
getVersion
in interfaceTask
-
getTriggers
public Collection<? extends TriggerType> getTriggers()
Description copied from interface:Task
NEVER modify objects returned in multithreaded environments!- Specified by:
getTriggers
in interfaceTask
-
getAssignments
public Collection<? extends AssignmentType> getAssignments()
Description copied from interface:Task
NEVER modify objects returned in multithreaded environments!- Specified by:
getAssignments
in interfaceTask
-
getPathToRootTask
public Collection<Task> getPathToRootTask(OperationResult parentResult) throws SchemaException
- Specified by:
getPathToRootTask
in interfaceTask
- Throws:
SchemaException
-
getTaskTreeId
public String getTaskTreeId(OperationResult result) throws SchemaException
- Specified by:
getTaskTreeId
in interfaceTask
- Throws:
SchemaException
-
getOwnerRef
public ObjectReferenceType getOwnerRef()
- Specified by:
getOwnerRef
in interfaceTask
-
getCachingProfiles
@NotNull public @NotNull Collection<String> getCachingProfiles()
- Specified by:
getCachingProfiles
in interfaceTask
-
getOperationResultHandlingStrategyName
public String getOperationResultHandlingStrategyName()
- Specified by:
getOperationResultHandlingStrategyName
in interfaceTask
-
setExecutionConstraints
public void setExecutionConstraints(TaskExecutionConstraintsType value)
- Specified by:
setExecutionConstraints
in interfaceTask
-
getExecutionEnvironment
public TaskExecutionEnvironmentType getExecutionEnvironment()
- Specified by:
getExecutionEnvironment
in interfaceTask
-
setExecutionEnvironment
public void setExecutionEnvironment(TaskExecutionEnvironmentType value)
- Specified by:
setExecutionEnvironment
in interfaceTask
-
setExecutionEnvironmentTransient
public void setExecutionEnvironmentTransient(TaskExecutionEnvironmentType value)
- Specified by:
setExecutionEnvironmentTransient
in interfaceTask
-
isScavenger
public boolean isScavenger()
- Specified by:
isScavenger
in interfaceTask
-
getTracingRequestedFor
@NotNull public @NotNull Collection<TracingRootType> getTracingRequestedFor()
- Specified by:
getTracingRequestedFor
in interfaceTask
-
addTracingRequest
public void addTracingRequest(TracingRootType point)
- Specified by:
addTracingRequest
in interfaceTask
-
removeTracingRequests
public void removeTracingRequests()
- Specified by:
removeTracingRequests
in interfaceTask
-
getTracingProfile
public TracingProfileType getTracingProfile()
- Specified by:
getTracingProfile
in interfaceTask
-
setTracingProfile
public void setTracingProfile(TracingProfileType tracingProfile)
- Specified by:
setTracingProfile
in interfaceTask
-
-