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 class
ActivityItemProcessingStatistics.OperationImpl
Real implementation of theOperation
interface.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
format(ActivityItemProcessingStatisticsType source)
static String
format(ActivityItemProcessingStatisticsType source, AbstractStatisticsPrinter.Options options)
Formats the information.static String
format(List<ActivityItemProcessingStatisticsType> sources)
int
getItemsProcessed()
@NotNull ActivityItemProcessingStatisticsType
getValueCopy()
Returns a current value of this statistics.void
initialize(ActivityItemProcessingStatisticsType initialValue)
Operation
recordOperationStart(IterativeOperationStartInfo startInfo)
Records an operation that has been just started.void
recordRunEnd(long startTimestamp, long endTimestamp)
void
recordRunStart(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()
-
-