Class IterativeTaskInformation
- java.lang.Object
-
- com.evolveum.midpoint.schema.statistics.IterativeTaskInformation
-
public class IterativeTaskInformation extends Object
This is "live" iterative task 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 task. 2. But queries are invoked either from this thread, or from some observer (task manager or GUI thread). Implementation: Because the iterative task information grew to quite complex structure, we no longer keep "native" form and "bean" form separately. Now we simply store the native 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 static interface
IterativeTaskInformation.Operation
Operation being recorded: represents an object to which the client reports the end of the operation.class
IterativeTaskInformation.OperationImpl
Real implementation of theIterativeTaskInformation.Operation
interface.
-
Field Summary
Fields Modifier and Type Field Description static int
LAST_FAILURES_KEPT
Deprecated.protected org.apache.commons.collections.buffer.CircularFifoBuffer
lastFailures
Deprecated.
-
Constructor Summary
Constructors Constructor Description IterativeTaskInformation(@NotNull PrismContext prismContext)
IterativeTaskInformation(IterativeTaskInformationType value, boolean collectExecutions, @NotNull PrismContext prismContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
addTo(@NotNull IterativeTaskInformationType sum, @Nullable IterativeTaskInformationType delta)
Updates specified summary with given delta.static String
format(IterativeTaskInformationType source)
static String
format(IterativeTaskInformationType source, AbstractStatisticsPrinter.Options options)
Formats the information.static String
format(List<IterativeTaskInformationType> sources)
List<String>
getLastFailures()
Deprecated.IterativeTaskInformationType
getValueCopy()
Returns a current value of this statistics.boolean
isCollectExecutions()
IterativeTaskInformation.Operation
recordOperationStart(IterativeOperationStartInfo startInfo)
Records an operation that has been just started.void
recordPartExecutionEnd(String partUri, long partStartTimestamp, long partEndTimestamp)
-
-
-
Field Detail
-
LAST_FAILURES_KEPT
@Deprecated public static final int LAST_FAILURES_KEPT
Deprecated.- See Also:
- Constant Field Values
-
lastFailures
@Deprecated protected org.apache.commons.collections.buffer.CircularFifoBuffer lastFailures
Deprecated.
-
-
Constructor Detail
-
IterativeTaskInformation
public IterativeTaskInformation(@NotNull @NotNull PrismContext prismContext)
-
IterativeTaskInformation
public IterativeTaskInformation(IterativeTaskInformationType value, boolean collectExecutions, @NotNull @NotNull PrismContext prismContext)
-
-
Method Detail
-
getValueCopy
public IterativeTaskInformationType getValueCopy()
Returns a current value of this statistics. It is copied because of thread safety issues.
-
recordOperationStart
public IterativeTaskInformation.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.
-
recordPartExecutionEnd
public void recordPartExecutionEnd(String partUri, long partStartTimestamp, long partEndTimestamp)
-
addTo
public static void addTo(@NotNull @NotNull IterativeTaskInformationType sum, @Nullable @Nullable IterativeTaskInformationType delta)
Updates specified summary with given delta.
-
getLastFailures
@Deprecated public List<String> getLastFailures()
Deprecated.
-
format
public static String format(IterativeTaskInformationType source)
-
format
public static String format(List<IterativeTaskInformationType> sources)
-
format
public static String format(IterativeTaskInformationType source, AbstractStatisticsPrinter.Options options)
Formats the information.
-
isCollectExecutions
public boolean isCollectExecutions()
-
-