use of com.evolveum.midpoint.xml.ns._public.common.common_3.BucketProgressOverviewType in project midpoint by Evolveum.
the class GetBucketOperationAttempt method setOrUpdateEstimatedNumberOfBuckets.
private void setOrUpdateEstimatedNumberOfBuckets() throws SchemaException {
Integer number = bucketFactory.estimateNumberOfBuckets();
if (number != null && !number.equals(getNumberOfBuckets(activityState))) {
List<ItemDelta<?, ?>> numberOfBucketsMods = PrismContext.get().deltaFor(TaskType.class).item(activityStateItemPath.append(F_BUCKETING, F_NUMBER_OF_BUCKETS)).replace(number).asItemDeltas();
LOGGER.trace("Going to set # of buckets:\n{}", DebugUtil.debugDumpLazily(numberOfBucketsMods, 1));
modifications.addAll(numberOfBucketsMods);
}
// The number of complete buckets is not changed by this operation, so we can report the progress right now.
bucketProgressHolder.accept(new BucketProgressOverviewType().totalBuckets(number).completeBuckets(BucketingUtil.getCompleteBucketsNumber(currentBuckets)));
}
Aggregations