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.SerializableRetry policy for a retryable code.- Author:
- Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
- 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 longgetDelay()intgetMaxAttempts()java.util.concurrent.TimeUnitgetTimeUnit()java.lang.StringtoString()
-
-
-
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
-
-