public class StateSyncStatistics extends BaseSyncStatistics
| Constructor and Description |
|---|
StateSyncStatistics() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMissingDependency(java.lang.String parentKey,
java.lang.String childKey)
This method checks if there is an entry with the key of the
missingParentStateKey in
the stateKeysWithMissingParents, if there isn't it creates a new entry with this parent
key and as a value a new set containing the childKey. |
int |
getNumberOfStatesWithMissingParents()
Returns the total number of states with missing parents.
|
java.lang.String |
getReportMessage()
Builds a summary of the state sync statistics instance that looks like the following example:
|
java.util.Set<java.lang.String> |
removeAndGetReferencingKeys(java.lang.String key) |
calculateProcessingTime, getCreated, getDefaultReportMessageForResource, getFailed, getLatestBatchHumanReadableProcessingTime, getLatestBatchProcessingTimeInDays, getLatestBatchProcessingTimeInHours, getLatestBatchProcessingTimeInMillis, getLatestBatchProcessingTimeInMinutes, getLatestBatchProcessingTimeInSeconds, getProcessed, getUpdated, incrementCreated, incrementCreated, incrementFailed, incrementFailed, incrementProcessed, incrementProcessed, incrementUpdated, incrementUpdated, startTimerpublic java.lang.String getReportMessage()
"Summary: 4 state(s) were processed in total (1 created, 1 updated, 1 failed to sync and 1 product(s) with a missing transition(s))."
getReportMessage in class BaseSyncStatisticspublic int getNumberOfStatesWithMissingParents()
public void addMissingDependency(@Nonnull
java.lang.String parentKey,
@Nonnull
java.lang.String childKey)
missingParentStateKey in
the stateKeysWithMissingParents, if there isn't it creates a new entry with this parent
key and as a value a new set containing the childKey. Otherwise, if there is already,
it just adds the childKey to the existing set.parentKey - the key of the missing parent.childKey - the key of the state with a missing parent.@Nullable
public java.util.Set<java.lang.String> removeAndGetReferencingKeys(@Nonnull
java.lang.String key)