com.evolveum.midpoint.task.api.TaskManager.suspendTasks()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中com.evolveum.midpoint.task.api.TaskManager.suspendTasks()方法的一些代码示例,展示了TaskManager.suspendTasks()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TaskManager.suspendTasks()方法的具体详情如下:
包路径:com.evolveum.midpoint.task.api.TaskManager
类名称:TaskManager
方法名:suspendTasks

TaskManager.suspendTasks介绍

[英]Suspends a set of tasks. Sets their execution status to SUSPENDED. Stops their execution (unless doNotStop is set).
[中]暂停一组任务。将其执行状态设置为暂停。停止执行(除非设置了doNotStop)。

代码示例

代码示例来源:origin: Evolveum/midpoint

@Override
public boolean suspendTasks(Collection<String> taskOids, long waitForStop, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException {
  authorizeTaskCollectionOperation(ModelAuthorizationAction.SUSPEND_TASK, taskOids, operationTask, parentResult);
  return taskManager.suspendTasks(taskOids, waitForStop, parentResult);
}

代码示例来源:origin: Evolveum/midpoint

public void suspendTasks() {
  // suspend root task in order to fail faster
  taskManager.suspendTasks(tasksToSuspendOnError, TaskManager.DO_NOT_WAIT, new OperationResult("dummy"));
}

代码示例来源:origin: Evolveum/midpoint

protected void resetTriggerTask(String taskOid, File taskFile, OperationResult result)
    throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException, FileNotFoundException {
  taskManager.suspendAndDeleteTasks(Collections.singletonList(taskOid), 60000L, true, result);
  importObjectFromFile(taskFile, result);
  taskManager.suspendTasks(Collections.singletonList(taskOid), 60000L, result);
  modifySystemObjectInRepo(TaskType.class, taskOid,
      prismContext.deltaFor(TaskType.class)
          .item(TaskType.F_SCHEDULE).replace()
          .asItemDeltas(),
      result);
  taskManager.resumeTasks(singleton(taskOid), result);
}

代码示例来源:origin: Evolveum/midpoint

boolean suspended = taskManager.suspendTasks(singleton(TASK_TRIGGER_SCANNER_OID), 20000L, result);
assertTrue("trigger scanner task was not suspended (before operation)", suspended);
suspended = taskManager.suspendTasks(singleton(TASK_TRIGGER_SCANNER_OID), 20000L, result);
assertTrue("trigger scanner task was not suspended (after operation)", suspended);

代码示例来源:origin: Evolveum/midpoint

assertNoObject(TaskType.class, oid2, task, result);
taskManager.suspendTasks(singleton(TASK_TRIGGER_SCANNER_OID), 10000L, result);

相关文章