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 T
retries once after a delay ofFIVE_SECONDS
default T
withRetry
(int nTimes) retries nTimes and waitsFIVE_SECONDS
between triesdefault T
retries 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_SECONDS
between 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 isnull
orDuration.isNegative()
-
withRetry
- Parameters:
nTimes
->= 0
delay
- notnull
, notDuration.isNegative()
- Returns:
- T
- Throws:
IllegalArgumentException
- if given nTimes or delay isnull
orDuration.isNegative()
-
withRetryForever
- Parameters:
delay
- notnull
, notDuration.isNegative()
- Returns:
- T
- Throws:
IllegalArgumentException
- if given delay isnull
orDuration.isNegative()
-