本文整理了Java中com.evolveum.midpoint.task.api.Task.getWorkState()
方法的一些代码示例,展示了Task.getWorkState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getWorkState()
方法的具体详情如下:
包路径:com.evolveum.midpoint.task.api.Task
类名称:Task
方法名:getWorkState
暂无
代码示例来源:origin: Evolveum/midpoint
@NotNull
private TaskWorkStateType getWorkState(Task task) throws SchemaException {
if (task.getWorkState() != null) {
return task.getWorkState();
} else {
throw new SchemaException("No work state in task " + task);
}
}
代码示例来源:origin: Evolveum/midpoint
public static Task findWorkerByBucketNumber(List<Task> workers, int sequentialNumber) {
for (Task worker : workers) {
if (worker.getWorkState() != null && TaskWorkStateTypeUtil
.findBucketByNumber(worker.getWorkState().getBucket(), sequentialNumber) != null) {
return worker;
}
}
return null;
}
代码示例来源:origin: Evolveum/midpoint
private void setOrUpdateEstimatedNumberOfBuckets(Task task, WorkSegmentationStrategy workStateStrategy, OperationResult result)
throws SchemaException, ObjectAlreadyExistsException, ObjectNotFoundException {
Integer number = workStateStrategy.estimateNumberOfBuckets(task.getWorkState());
if (number != null && (task.getWorkState() == null || !number.equals(task.getWorkState().getNumberOfBuckets()))) {
List<ItemDelta<?, ?>> itemDeltas = prismContext.deltaFor(TaskType.class)
.item(TaskType.F_WORK_STATE, TaskWorkStateType.F_NUMBER_OF_BUCKETS).replace(number)
.asItemDeltas();
repositoryService.modifyObject(TaskType.class, task.getOid(), itemDeltas, result);
}
}
代码示例来源:origin: Evolveum/midpoint
int created = createWorkers(coordinatorTask, shouldBeWorkers, perNodeConfigurationMap, result);
TaskWorkStateType workState = coordinatorTask.getWorkState();
Integer closedBecauseDone = null;
if (isCloseWorkersOnWorkDone(options) && workState != null && Boolean.TRUE.equals(workState.isAllWorkComplete())) {
代码示例来源:origin: Evolveum/midpoint
setOrCheckTaskKind(task, opResult);
List<Task> workers = task.listSubtasks(true, opResult);
boolean clean = task.getWorkState() == null || Boolean.TRUE.equals(task.getWorkState().isAllWorkComplete());
代码示例来源:origin: Evolveum/midpoint
throws SchemaException, PreconditionViolationException, ObjectNotFoundException, ObjectAlreadyExistsException {
List<Task> workers = coordinatorTask.listSubtasks(true, result);
if (coordinatorTask.getWorkState() == null) {
return false;
TaskWorkStateType newState = coordinatorTask.getWorkState().clone();
int reclaiming = 0;
for (WorkBucketType bucket : newState.getBucket()) {
代码示例来源:origin: Evolveum/midpoint
buckets = new ArrayList<>(coordinator.getWorkState().getBucket());
sortBucketsBySequentialNumber(buckets);
buckets = new ArrayList<>(coordinator.getWorkState().getBucket());
sortBucketsBySequentialNumber(buckets);
assertEquals(3, buckets.size());
内容来源于网络,如有侵权,请联系作者删除!