Class ActivityItemProcessingStatistics
- java.lang.Object
-
- com.evolveum.midpoint.repo.common.activity.run.state.Initializable
-
- com.evolveum.midpoint.repo.common.activity.run.state.ActivityItemProcessingStatistics
-
public class ActivityItemProcessingStatistics extends Initializable
This is "live" iteration information. BEWARE: When explicitly enabled, automatically updates also the structured progress when recording operation end. This is somewhat experimental and should be reconsidered. Thread safety: Must be thread safe. 1. Updates are invoked in the context of the thread executing the activity. 2. But queries are invoked either from this thread, or from some observer (task manager or GUI thread). Implementation: Because the iteration information grew to quite complex structure, we no longer keep "native" form and "bean" form separately. Now we simply store the bean form, and provide the necessary synchronization. Also, we no longer distinguish start value and delta. Everything is kept in thevalue.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classActivityItemProcessingStatistics.OperationImplReal implementation of theOperationinterface.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Stringformat(ActivityItemProcessingStatisticsType source)static Stringformat(ActivityItemProcessingStatisticsType source, AbstractStatisticsPrinter.Options options)Formats the information.static Stringformat(List<ActivityItemProcessingStatisticsType> sources)intgetItemsProcessed()@NotNull ActivityItemProcessingStatisticsTypegetValueCopy()Returns a current value of this statistics.voidinitialize(ActivityItemProcessingStatisticsType initialValue)OperationrecordOperationStart(IterativeOperationStartInfo startInfo)Records an operation that has been just started.voidrecordRunEnd(long startTimestamp, long endTimestamp)voidrecordRunStart(long startTimestamp)-
Methods inherited from class com.evolveum.midpoint.repo.common.activity.run.state.Initializable
assertInitialized, doInitialize
-
-
-
-
Method Detail
-
initialize
public void initialize(ActivityItemProcessingStatisticsType initialValue)
-
getValueCopy
@NotNull public @NotNull ActivityItemProcessingStatisticsType getValueCopy()
Returns a current value of this statistics. It is copied because of thread safety issues.
-
recordOperationStart
public Operation recordOperationStart(IterativeOperationStartInfo startInfo)
Records an operation that has been just started. Stores it into the list of current operations. Returns an object that should receive the status of the operation, in order to record the operation end.
-
recordRunStart
public void recordRunStart(long startTimestamp)
-
recordRunEnd
public void recordRunEnd(long startTimestamp, long endTimestamp)
-
format
public static String format(ActivityItemProcessingStatisticsType source)
-
format
public static String format(List<ActivityItemProcessingStatisticsType> sources)
-
format
public static String format(ActivityItemProcessingStatisticsType source, AbstractStatisticsPrinter.Options options)
Formats the information.
-
getItemsProcessed
public int getItemsProcessed()
-
-