Class SynchronizationStatisticsCollectorImpl
java.lang.Object
com.evolveum.midpoint.repo.common.activity.run.state.sync.SynchronizationStatisticsCollectorImpl
- All Implemented Interfaces:
SynchronizationStatisticsCollector
public class SynchronizationStatisticsCollectorImpl
extends Object
implements SynchronizationStatisticsCollector
Tracks synchronization situation changes during a single item processing.
Assumptions:
1. Exists during a single item processing only.
2. Executed from a single thread only (the worker task).
-
Constructor Summary
ConstructorDescriptionSynchronizationStatisticsCollectorImpl
(@NotNull ActivitySynchronizationStatistics activitySynchronizationStatistics, @NotNull String processingIdentifier, SynchronizationSituationType situationOnStart) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onSynchronizationExclusion
(@Nullable String processingIdentifier, @NotNull SynchronizationExclusionReasonType exclusionReason) Informs the task that no synchronization will take place.void
onSynchronizationSituationChange
(@Nullable String processingIdentifier, @Nullable String shadowOid, @Nullable SynchronizationSituationType situation) Informs the task that sync situation has changed for given shadow OID.void
onSynchronizationStart
(@Nullable String processingIdentifier, @Nullable String shadowOid, @Nullable SynchronizationSituationType situation) Called when a situation was determined right before a synchronization takes place.void
stop
(@NotNull QualifiedItemProcessingOutcomeType outcome) Records the synchronization-related information into the statistics.toString()
-
Constructor Details
-
SynchronizationStatisticsCollectorImpl
public SynchronizationStatisticsCollectorImpl(@NotNull @NotNull ActivitySynchronizationStatistics activitySynchronizationStatistics, @NotNull @NotNull String processingIdentifier, SynchronizationSituationType situationOnStart)
-
-
Method Details
-
onSynchronizationStart
public void onSynchronizationStart(@Nullable @Nullable String processingIdentifier, @Nullable @Nullable String shadowOid, @Nullable @Nullable SynchronizationSituationType situation) Description copied from interface:SynchronizationStatisticsCollector
Called when a situation was determined right before a synchronization takes place. We assume that we have a shadow with OID by that time. (If the OID is null we ignore further synchronization situation updates.)- Specified by:
onSynchronizationStart
in interfaceSynchronizationStatisticsCollector
-
onSynchronizationExclusion
public void onSynchronizationExclusion(@Nullable @Nullable String processingIdentifier, @NotNull @NotNull SynchronizationExclusionReasonType exclusionReason) Description copied from interface:SynchronizationStatisticsCollector
Informs the task that no synchronization will take place. Note that in theory it is possible thatSynchronizationStatisticsCollector.onSynchronizationStart(String, String, SynchronizationSituationType)
is called first.- Specified by:
onSynchronizationExclusion
in interfaceSynchronizationStatisticsCollector
-
onSynchronizationSituationChange
public void onSynchronizationSituationChange(@Nullable @Nullable String processingIdentifier, @Nullable @Nullable String shadowOid, @Nullable @Nullable SynchronizationSituationType situation) Description copied from interface:SynchronizationStatisticsCollector
Informs the task that sync situation has changed for given shadow OID. There could be more such changes. But we are interested in the last one. If the shadow OID is null, we ignore such updates.- Specified by:
onSynchronizationSituationChange
in interfaceSynchronizationStatisticsCollector
-
stop
Description copied from interface:SynchronizationStatisticsCollector
Records the synchronization-related information into the statistics. Stops the watching.- Specified by:
stop
in interfaceSynchronizationStatisticsCollector
-
toString
-