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

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

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

Task.recordIterativeOperationEnd介绍

暂无

代码示例

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

public void record(Task task) {
    task.recordSynchronizationOperationEnd(objectName, objectDisplayName, ShadowType.COMPLEX_TYPE,
        objectOid, started, exception, originalStateIncrement, newStateIncrement);
    if (SchemaConstants.CHANGE_CHANNEL_LIVE_SYNC_URI.equals(channel)) {
      // livesync processing is not controlled via model -> so we cannot do this in upper layers
      task.recordIterativeOperationEnd(objectName, objectDisplayName, ShadowType.COMPLEX_TYPE,
          objectOid, started, exception);
    }
  }
}

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

/**
 * This methods will be called for each search result. It means it will be
 * called for each account on a resource. We will pretend that the account
 * was created and invoke notification interface.
 */
@Override
protected boolean handleObject(PrismObject<ShadowType> accountShadow, Task workerTask, OperationResult result) {
  long started = System.currentTimeMillis();
  try {
    workerTask.recordIterativeOperationStart(accountShadow.asObjectable());
    boolean rv = handleObjectInternal(accountShadow, workerTask, result);
    result.computeStatusIfUnknown();
    if (result.isError()) {
      workerTask.recordIterativeOperationEnd(accountShadow.asObjectable(), started, getException(result));
    } else {
      workerTask.recordIterativeOperationEnd(accountShadow.asObjectable(), started, null);
    }
    return rv;
  } catch (Throwable t) {
    workerTask.recordIterativeOperationEnd(accountShadow.asObjectable(), started, t);
    throw t;
  }
}

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

LOGGER.info("Campaign {} was started.", ObjectTypeUtil.toShortString(campaign));
task.recordIterativeOperationEnd(campaignName, campaignName, AccessCertificationCampaignType.COMPLEX_TYPE, campaignOid, started, null);
  task.recordIterativeOperationEnd(campaignName, campaignName, AccessCertificationCampaignType.COMPLEX_TYPE, campaignOid, started, e);

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

executionTask.recordIterativeOperationEnd(taskName, null, TaskType.COMPLEX_TYPE, taskOid, started, lastProblem);
} catch (Throwable t) {
  executionTask.recordIterativeOperationEnd(taskName, null, TaskType.COMPLEX_TYPE, taskOid, started, t);
  throw t;

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

workerTask.recordIterativeOperationEnd(objectName, objectDisplayName,
} else {
  if (isRecordIterationStatistics()) {
    workerTask.recordIterativeOperationEnd(objectName, objectDisplayName,
  workerTask.recordIterativeOperationEnd(objectName, objectDisplayName,

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

task.recordIterativeOperationEnd(shadow.asObjectable(), started, null);
  processedSuccess++;
} catch (Throwable ex) {
  task.recordIterativeOperationEnd(shadow.asObjectable(), started, ex);
  processedFailure++;
  opResult.recordFatalError("Failed to finish operation with shadow: " + ObjectTypeUtil.toShortString(shadow.asObjectable()) +". Reason: " + ex.getMessage(), ex);

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

public void recordEnd(ExecutionContext context, ObjectType objectType, long started, Throwable ex) {
  if (context.isRecordProgressAndIterationStatistics()) {
    if (context.getTask() != null && objectType != null) {
      context.getTask().recordIterativeOperationEnd(
          PolyString.getOrig(objectType.getName()),
          StatisticsUtil.getDisplayName(objectType.asPrismObject()),
          StatisticsUtil.getObjectType(objectType, prismContext),
          objectType.getOid(),
          started, ex);
    } else {
      LOGGER.warn("Couldn't record operation end in script execution; task = {}, objectType = {}",
          context.getTask(), objectType);
    }
    if (context.getTask() != null) {
      context.getTask().setProgress(context.getTask().getProgress() + 1);
    }
  }
}

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

processor.process(task, workBucket, i);
task.recordIterativeOperationEnd(objectName, null, ObjectType.COMPLEX_TYPE, objectOid,
    System.currentTimeMillis() - start, null);
task.incrementProgressAndStoreStatsIfNeeded();

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

localCoordinatorTask.recordIterativeOperationStart(shadow.asObjectable());
  resourceShadow = reconcileShadow(shadow, resource, localCoordinatorTask);
  localCoordinatorTask.recordIterativeOperationEnd(shadow.asObjectable(), started1, null);
} catch (Throwable t) {
  localCoordinatorTask.recordIterativeOperationEnd(shadow.asObjectable(), started1, t);
  throw t;

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

try {
  modelService.executeChanges(MiscSchemaUtil.createCollection(delta), execOptions, task, opResult);
  task.recordIterativeOperationEnd(objectName, objectDisplayName, objectTypeName, objectOid, objectDeletionStarted, null);
} catch (Throwable t) {
  task.recordIterativeOperationEnd(objectName, objectDisplayName, objectTypeName, objectOid, objectDeletionStarted, t);
  throw t;		// TODO we don't want to continue processing if an error occurs?

相关文章

微信公众号

最新文章

更多