Package dev.dsf.bpe.v2.client.dsf
Interface RetryClient<T>
- All Known Subinterfaces:
DsfClient,PreferReturnMinimalWithRetry,PreferReturnOutcomeWithRetry
public interface RetryClient<T>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault Tretries once after a delay ofFIVE_SECONDSdefault TwithRetry(int nTimes) retries nTimes and waitsFIVE_SECONDSbetween triesdefault Tretries once after the given delaywithRetryForever(Duration delay)
-
Field Details
-
RETRY_ONCE
static final int RETRY_ONCE- See Also:
-
RETRY_FOREVER
static final int RETRY_FOREVER- See Also:
-
FIVE_SECONDS
-
-
Method Details
-
withRetry
retries once after a delay ofFIVE_SECONDS- Returns:
- T
-
withRetry
retries nTimes and waitsFIVE_SECONDSbetween tries- Parameters:
nTimes->= 0- Returns:
- T
- Throws:
IllegalArgumentException- if given nTimes is<0
-
withRetry
retries once after the given delay- Parameters:
delay- notnull, notDuration.isNegative()- Returns:
- T
- Throws:
IllegalArgumentException- if given delay isnullorDuration.isNegative()
-
withRetry
- Parameters:
nTimes->= 0delay- notnull, notDuration.isNegative()- Returns:
- T
- Throws:
IllegalArgumentException- if given nTimes or delay isnullorDuration.isNegative()
-
withRetryForever
- Parameters:
delay- notnull, notDuration.isNegative()- Returns:
- T
- Throws:
IllegalArgumentException- if given delay isnullorDuration.isNegative()
-