public class Retrier extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_RETRIES |
static long |
TIME_TO_WAIT_MS |
Constructor and Description |
---|
Retrier() |
Retrier(int argMaxRetries,
long argTimeToWaitMS) |
Modifier and Type | Method and Description |
---|---|
void |
exceptionOccurred()
Call when an exception has occurred in the block.
|
boolean |
shouldRetry()
Returns true if a retry can be attempted.
|
void |
waitUntilNextTry()
Waits for timeToWaitMS.
|
public static final int MAX_RETRIES
public static final long TIME_TO_WAIT_MS
public Retrier(int argMaxRetries, long argTimeToWaitMS)
public Retrier()
public boolean shouldRetry()
public void waitUntilNextTry()
public void exceptionOccurred() throws InterruptedException
Exception
InterruptedException
Copyright © 2016–2024. All rights reserved.