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

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

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

Task.setProgressImmediate介绍

[英]"Immediate" version of the above method.
[中]上述方法的“即时”版本。

代码示例

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

private void recordProgress(Task task, long progress, OperationResult opResult) {
  try {
    task.setProgressImmediate(progress, opResult);
  } catch (ObjectNotFoundException e) {             // these exceptions are of so little probability and harmless, so we just log them and do not report higher
    LoggingUtils.logException(LOGGER, "Couldn't record progress to task {}, probably because the task does not exist anymore", e, task);
  } catch (SchemaException e) {
    LoggingUtils.logException(LOGGER, "Couldn't record progress to task {}, due to unexpected schema exception", e, task);
  }
}

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

private void recordProgress(Task task, long progress, OperationResult opResult) {
  try {
    task.setProgressImmediate(progress, opResult);
  } catch (ObjectNotFoundException e) {             // these exceptions are of so little probability and harmless, so we just log them and do not report higher
    LoggingUtils.logException(LOGGER, "Couldn't record progress to task {}, probably because the task does not exist anymore", e, task);
  } catch (SchemaException e) {
    LoggingUtils.logException(LOGGER, "Couldn't record progress to task {}, due to unexpected schema exception", e, task);
  }
}

相关文章