public class SimpleRetryStrategy extends Object implements IRetryStrategy
FcmRetryAfterException for a
maximum number of retries.
The @see FcmRetryAfterException includes a Retry Delay, which indicates when the method
should be retried. This Strategy waits for the amount of time given in the @see FcmRetryAfterException
and waits for a fixed amount of time.| Constructor and Description |
|---|
SimpleRetryStrategy(int maxRetries) |
| Modifier and Type | Method and Description |
|---|---|
void |
doWithRetry(Action0 action)
Retries a function without a return value.
|
<TResult> TResult |
getWithRetry(Func1<TResult> function)
Retries a function with a return values.
|
public void doWithRetry(Action0 action)
IRetryStrategydoWithRetry in interface IRetryStrategyaction - Action to invoke.public <TResult> TResult getWithRetry(Func1<TResult> function)
IRetryStrategygetWithRetry in interface IRetryStrategyTResult - Result of the invocation.function - Function to invoke.Copyright © 2017. All rights reserved.