Package org.jeasy.batch.core.retry
Class RetryPolicy
- java.lang.Object
-
- org.jeasy.batch.core.retry.RetryPolicy
-
- All Implemented Interfaces:
java.io.Serializable
public class RetryPolicy extends java.lang.Object implements java.io.Serializable
Retry policy for a retryable code.- Author:
- Mahmoud Ben Hassine ([email protected])
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RetryPolicy(int maxAttempts, long delay, java.util.concurrent.TimeUnit timeUnit)
Create a newRetryPolicy
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDelay()
int
getMaxAttempts()
java.util.concurrent.TimeUnit
getTimeUnit()
java.lang.String
toString()
-
-
-
Constructor Detail
-
RetryPolicy
public RetryPolicy(int maxAttempts, long delay, java.util.concurrent.TimeUnit timeUnit)
Create a newRetryPolicy
.- Parameters:
maxAttempts
- number of retriesdelay
- to wait between retriestimeUnit
- of the delay to wait between retries
-
-