Package org.bhn.promotion.core.service
Class RollbackRetryService
java.lang.Object
org.bhn.promotion.core.service.RollbackRetryService
Service responsible for handling retryable rollback operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionperformRollbackWithRetry(RollbackRequest rollbackRequest) Performs a rollback operation with retry logic for handling transient failures.
-
Constructor Details
-
RollbackRetryService
public RollbackRetryService()
-
-
Method Details
-
performRollbackWithRetry
@Retryable(retryFor=RollbackException.class, maxAttempts=3, backoff=@Backoff(delay=1000L,maxDelay=5000L,multiplier=2.0)) public RollbackResponseModel performRollbackWithRetry(RollbackRequest rollbackRequest) throws RollbackException Performs a rollback operation with retry logic for handling transient failures.This method attempts to perform a rollback using the provided rollback request. If the operation fails due to an internal server error, it will retry the operation up to 3 times with a delay of 3 seconds between attempts.
- Parameters:
rollbackRequest- The rollback request containing details of the promotion rollback.- Returns:
- The response model containing details of the rollback operation.
- Throws:
RollbackException- If the rollback operation fails after all retry attempts.
-