Class ActivityProgress
- java.lang.Object
-
- com.evolveum.midpoint.repo.common.activity.run.state.Initializable
-
- com.evolveum.midpoint.repo.common.activity.run.state.ActivityProgress
-
public class ActivityProgress extends Initializable
Takes care of reporting the activity progress. The counters are managed in memory, and written to the running task (in-memory + repo representation) in regular intervals. Although this is mostly relevant for iterative activities (seeIterativeActivityRun
), it has its place also in non-standard activities that do their own iteration, like the cleanup activity. The distinction between open and closed items is relevant to activities with "commit points", like bucketed ones.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ActivityProgress.Counters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearUncommitted()
@Nullable Integer
getExpectedInCurrentBucket()
@Nullable Integer
getExpectedTotal()
@NotNull ItemsProgressOverviewType
getOverview()
@NotNull ActivityProgressType
getValueCopy()
Returns a clone of the current value.void
increment(QualifiedItemProcessingOutcomeType outcome, @NotNull ActivityProgress.Counters counters)
Increments the progress.void
initialize(ActivityProgressType initialValue)
void
onCommitPoint()
Moves "uncommitted" counters to "committed" state.void
setExpectedInCurrentBucket(Integer expectedInCurrentBucket)
void
setExpectedTotal(Integer expectedTotal)
-
Methods inherited from class com.evolveum.midpoint.repo.common.activity.run.state.Initializable
assertInitialized, doInitialize
-
-
-
-
Method Detail
-
initialize
public void initialize(ActivityProgressType initialValue)
-
increment
public void increment(QualifiedItemProcessingOutcomeType outcome, @NotNull @NotNull ActivityProgress.Counters counters)
Increments the progress.
-
onCommitPoint
public void onCommitPoint()
Moves "uncommitted" counters to "committed" state.
-
clearUncommitted
public void clearUncommitted()
-
getExpectedTotal
@Nullable public @Nullable Integer getExpectedTotal()
-
setExpectedTotal
public void setExpectedTotal(Integer expectedTotal)
-
getExpectedInCurrentBucket
@Nullable public @Nullable Integer getExpectedInCurrentBucket()
-
setExpectedInCurrentBucket
public void setExpectedInCurrentBucket(Integer expectedInCurrentBucket)
-
getValueCopy
@NotNull public @NotNull ActivityProgressType getValueCopy()
Returns a clone of the current value. The cloning is because of thread safety requirements.
-
getOverview
@NotNull public @NotNull ItemsProgressOverviewType getOverview()
-
-