Class StructuredTaskProgress
- java.lang.Object
-
- com.evolveum.midpoint.schema.statistics.StructuredTaskProgress
-
public class StructuredTaskProgress extends Object
This is "live" structured task progress information. Thread safety: Must be thread safe. 1. Updates are invoked in the context of the thread executing the task. 2. But queries are invoked either from this thread, or from some observer (task manager or GUI thread).
-
-
Constructor Summary
Constructors Constructor Description StructuredTaskProgress(@NotNull PrismContext prismContext)StructuredTaskProgress(StructuredTaskProgressType value, @NotNull PrismContext prismContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddTo(@NotNull StructuredTaskProgressType sum, @NotNull StructuredTaskProgressType delta)Updates specified summary with given delta.voidchangeOnWorkBucketCompletion()Moves "open" counters to "closed" state.static Stringformat(StructuredTaskProgressType source)static Stringformat(StructuredTaskProgressType source, AbstractStatisticsPrinter.Options options)Formats the information.StructuredTaskProgressTypegetValueCopy()Returns a current value of this statistics.voidincrement(String partUri, QualifiedItemProcessingOutcomeType outcome)Increments the progress.voidmarkAsClosed()TEMPORARY.voidmarkAsComplete()voidsetPartInformation(String partUri, Integer partNumber, Integer expectedParts)Sets the part information.
-
-
-
Constructor Detail
-
StructuredTaskProgress
public StructuredTaskProgress(@NotNull @NotNull PrismContext prismContext)
-
StructuredTaskProgress
public StructuredTaskProgress(StructuredTaskProgressType value, @NotNull @NotNull PrismContext prismContext)
-
-
Method Detail
-
getValueCopy
public StructuredTaskProgressType getValueCopy()
Returns a current value of this statistics. It is copied because of thread safety issues.
-
setPartInformation
public void setPartInformation(String partUri, Integer partNumber, Integer expectedParts)
Sets the part information. Should be called when part processing starts. Here we also remove any open items in this part.
-
increment
public void increment(String partUri, QualifiedItemProcessingOutcomeType outcome)
Increments the progress.
-
changeOnWorkBucketCompletion
public void changeOnWorkBucketCompletion()
Moves "open" counters to "closed" state.
-
markAsComplete
public void markAsComplete()
-
markAsClosed
public void markAsClosed()
TEMPORARY.
-
addTo
public static void addTo(@NotNull @NotNull StructuredTaskProgressType sum, @NotNull @NotNull StructuredTaskProgressType delta)Updates specified summary with given delta.
-
format
public static String format(StructuredTaskProgressType source)
-
format
public static String format(StructuredTaskProgressType source, AbstractStatisticsPrinter.Options options)
Formats the information.
-
-