Class ActivityItemProcessingStatisticsUtil
java.lang.Object
com.evolveum.midpoint.schema.util.task.ActivityItemProcessingStatisticsUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
LikeList.add(Object)
but returns the value.static void
addTo
(@NotNull ActivityItemProcessingStatisticsType sum, @Nullable ActivityItemProcessingStatisticsType delta) Updates specified summary with given delta.static String
format
(@Nullable ActivityItemProcessingStatisticsType source) static String
format
(@Nullable ActivityItemProcessingStatisticsType source, AbstractStatisticsPrinter.Options options) Formats the information.static int
getErrors
(Collection<ActivityStateType> states) static int
getItemProcessingStatisticsFromStates
(@NotNull Collection<ActivityStateType> states) static int
getItemsProcessed
(@NotNull Collection<ActivityStateType> states) static int
getItemsProcessed
(ActivityItemProcessingStatisticsType itemProcessingStatistics) static int
static int
getItemsProcessedWithFailure
(@NotNull Collection<ActivityStateType> states) static int
static int
static int
static int
static int
static int
static String
getLastProcessedItemMessage
(ActivityItemProcessingStatisticsType info, Predicate<ProcessedItemSetType> itemSetFilter) Returns message about the item that was last processed by given task in item set defined by the filter.static String
getLastProcessedObjectName
(ActivityItemProcessingStatisticsType info, Predicate<ProcessedItemSetType> itemSetFilter) Returns object that was last processed by given task in item set defined by the filter.static String
getLastProcessedObjectOid
(ActivityItemProcessingStatisticsType info, Predicate<ProcessedItemSetType> itemSetFilter) Returns object OID that was last processed by given task in item set defined by the filter.static String
getLastSuccessObjectName
(@NotNull TaskType task) Returns object that was last successfully processed by given physical task.static String
static double
getProcessingTime
(@NotNull Collection<ActivityStateType> states) static double
static @NotNull ActivityItemProcessingStatisticsType
getSummarizedStatistics
(@Nullable TaskActivityStateType taskActivityState) static boolean
hasItemProcessingInformation
(@NotNull ActivityTreeUtil.ActivityStateInContext cState) static boolean
hasItemProcessingInformation
(@Nullable ActivityStateType state) static @NotNull ActivityItemProcessingStatisticsType
summarize
(@NotNull Collection<ActivityItemProcessingStatisticsType> deltas) static @NotNull ActivityItemProcessingStatisticsType
summarize
(@NotNull Stream<ActivityItemProcessingStatisticsType> deltas) static Double
-
Constructor Details
-
ActivityItemProcessingStatisticsUtil
public ActivityItemProcessingStatisticsUtil()
-
-
Method Details
-
getItemsProcessedWithFailure
-
getItemsProcessedWithSuccess
-
getItemsProcessedWithSkip
-
getItemsProcessedWithFailureShallow
-
getItemsProcessedWithSuccessShallow
-
getItemsProcessedWithSkipShallow
-
getItemsProcessedShallow
-
getItemsProcessed
-
getItemsProcessed
-
getItemsProcessedWithFailure
public static int getItemsProcessedWithFailure(@NotNull @NotNull Collection<ActivityStateType> states) -
getItemProcessingStatistics
public static ActivityItemProcessingStatisticsType getItemProcessingStatistics(ActivityStateType state) -
getErrorsShallow
-
getErrors
-
getProcessingTime
-
getProcessingTime
-
getLastProcessedObjectName
public static String getLastProcessedObjectName(ActivityItemProcessingStatisticsType info, Predicate<ProcessedItemSetType> itemSetFilter) Returns object that was last processed by given task in item set defined by the filter. TODO this should operate on a tree! -
getLastProcessedItemMessage
public static String getLastProcessedItemMessage(ActivityItemProcessingStatisticsType info, Predicate<ProcessedItemSetType> itemSetFilter) Returns message about the item that was last processed by given task in item set defined by the filter. TODO this should operate on a tree! -
getLastProcessedObjectOid
public static String getLastProcessedObjectOid(ActivityItemProcessingStatisticsType info, Predicate<ProcessedItemSetType> itemSetFilter) Returns object OID that was last processed by given task in item set defined by the filter. TODO this should operate on a tree! -
getLastSuccessObjectName
Returns object that was last successfully processed by given physical task. TODO optimize (avoid full summarization) -
getSummarizedStatistics
@NotNull public static @NotNull ActivityItemProcessingStatisticsType getSummarizedStatistics(@Nullable @Nullable TaskActivityStateType taskActivityState) -
getLastSuccessObjectName
-
toSeconds
-
add
LikeList.add(Object)
but returns the value. -
getItemProcessingStatisticsFromStates
public static List<ActivityItemProcessingStatisticsType> getItemProcessingStatisticsFromStates(@NotNull @NotNull Collection<ActivityStateType> states) -
summarize
@NotNull public static @NotNull ActivityItemProcessingStatisticsType summarize(@NotNull @NotNull Collection<ActivityItemProcessingStatisticsType> deltas) -
summarize
@NotNull public static @NotNull ActivityItemProcessingStatisticsType summarize(@NotNull @NotNull Stream<ActivityItemProcessingStatisticsType> deltas) -
addTo
public static void addTo(@NotNull @NotNull ActivityItemProcessingStatisticsType sum, @Nullable @Nullable ActivityItemProcessingStatisticsType delta) Updates specified summary with given delta. -
hasItemProcessingInformation
public static boolean hasItemProcessingInformation(@NotNull @NotNull ActivityTreeUtil.ActivityStateInContext cState) -
hasItemProcessingInformation
-
format
-
format
public static String format(@Nullable @Nullable ActivityItemProcessingStatisticsType source, AbstractStatisticsPrinter.Options options) Formats the information.
-