Class DefaultSyncRetryService
java.lang.Object
de.hybris.platform.outboundsync.retry.impl.DefaultSyncRetryService
- All Implemented Interfaces:
SyncRetryService
Default implementation for updating the persisted retries based on the results of the synchronization process
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected OutboundSyncRetryModelUpdates retry state and persists it.protected OutboundSyncRetryModelcreateNewRetry(OutboundItemDTOGroup outboundItemDTOGroup) Creates a new instance of the retry record but does not persist it.protected OutboundSyncRetryModelfindRetry(OutboundItemDTOGroup outboundItemDTOGroup) Searches the database for aOutboundSyncRetryModelthat contains the information in theOutboundItemprotected ModelServiceprotected OutboundSyncConfigurationprotected RetrySearchServicebooleanhandleSyncFailure(OutboundItemDTOGroup dtoGroup) Handles an outbound synchronization failure for the specified DTO group.voidhandleSyncSuccess(OutboundItemDTOGroup outboundItemDTOGroup) Performs the necessary operations in the retry table to handle a successful synchronizationvoidsetModelService(ModelService modelService) voidsetOutboundSyncConfiguration(OutboundSyncConfiguration outboundSyncConfiguration) voidsetRetrySearchService(RetrySearchService retrySearchService) protected voidPersists the givenOutboundSyncRetryModel
-
Constructor Details
-
DefaultSyncRetryService
public DefaultSyncRetryService()
-
-
Method Details
-
handleSyncFailure
Description copied from interface:SyncRetryServiceHandles an outbound synchronization failure for the specified DTO group.- Specified by:
handleSyncFailurein interfaceSyncRetryService- Parameters:
dtoGroup- a group of related items, for which a single synchronization should have been done but failed.- Returns:
true, if it was last attempt and no more future synchrinizations should be attempted for the specified item group;false, if more synchronizations should be attempted.
-
changeForUnsuccessfulSyncAttempt
Updates retry state and persists it.- Parameters:
retry- a retry record for the failed synchronization attempt.- Returns:
- update retry model
-
updateRetry
Persists the givenOutboundSyncRetryModel- Parameters:
retry-OutboundSyncRetryModelto save
-
handleSyncSuccess
Description copied from interface:SyncRetryServicePerforms the necessary operations in the retry table to handle a successful synchronization- Specified by:
handleSyncSuccessin interfaceSyncRetryService- Parameters:
outboundItemDTOGroup- of typeOutboundItemDTOGroupwith information about the successful synchronization
-
createNewRetry
Creates a new instance of the retry record but does not persist it.- Parameters:
outboundItemDTOGroup-OutboundItemDTOGroupconsists the information for creating theOutboundSyncRetryModel
-
findRetry
Searches the database for aOutboundSyncRetryModelthat contains the information in theOutboundItem- Parameters:
outboundItemDTOGroup-OutboundItemDTOGroupconsists the information for the search- Returns:
- An OutboundSyncRetryModel if found
-
getModelService
-
setModelService
-
getOutboundSyncConfiguration
-
setOutboundSyncConfiguration
-
getRetrySearchService
-
setRetrySearchService
-