Class CartDiscountSyncStatistics
- java.lang.Object
-
- com.commercetools.sync.commons.helpers.BaseSyncStatistics<CartDiscountSyncStatistics>
-
- com.commercetools.sync.cartdiscounts.helpers.CartDiscountSyncStatistics
-
public final class CartDiscountSyncStatistics extends BaseSyncStatistics<CartDiscountSyncStatistics>
-
-
Constructor Summary
Constructors Constructor Description CartDiscountSyncStatistics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getReportMessage()
Builds a summary of the cart discount sync statistics instance that looks like the following example:protected CartDiscountSyncStatistics
getThis()
-
Methods inherited from class com.commercetools.sync.commons.helpers.BaseSyncStatistics
calculateProcessingTime, equals, getCreated, getDefaultReportMessageForResource, getFailed, getLatestBatchHumanReadableProcessingTime, getLatestBatchProcessingTimeInDays, getLatestBatchProcessingTimeInHours, getLatestBatchProcessingTimeInMillis, getLatestBatchProcessingTimeInMinutes, getLatestBatchProcessingTimeInSeconds, getProcessed, getSyncStatisticsClassName, getUpdated, hashCode, incrementCreated, incrementCreated, incrementFailed, incrementFailed, incrementProcessed, incrementProcessed, incrementUpdated, incrementUpdated, startTimer
-
-
-
-
Method Detail
-
getReportMessage
public java.lang.String getReportMessage()
Builds a summary of the cart discount sync statistics instance that looks like the following example:"Summary: 2 cart discounts were processed in total (0 created, 0 updated and 0 failed to sync)."
- Specified by:
getReportMessage
in classBaseSyncStatistics<CartDiscountSyncStatistics>
- Returns:
- a summary message of the cart discount sync statistics instance.
-
getThis
protected CartDiscountSyncStatistics getThis()
Description copied from class:BaseSyncStatistics
Returnsthis
instance ofT
, which extendsBaseSyncStatistics
. The purpose of this method is to make sure thatthis
is an instance of a class which extendsBaseSyncStatistics
in order to be used in the generic methods of the class. Otherwise, without this method, the methods above would need to castthis to T
which could lead to a runtime error of the class was extended in a wrong way.- Specified by:
getThis
in classBaseSyncStatistics<CartDiscountSyncStatistics>
- Returns:
- an instance of the class that overrides this method.
-
-