Package com.google.cloud.hadoop.util
Class RetryBoundedBackOff
- java.lang.Object
-
- com.google.cloud.hadoop.util.RetryBoundedBackOff
-
- All Implemented Interfaces:
com.google.api.client.util.BackOff
@NotThreadSafe public class RetryBoundedBackOff extends Object implements com.google.api.client.util.BackOff
An implementation ofBackOffthat limits the number of calls on anotherBackOff. This class will call the same methods of another BackOff until the maximum number of retries are reached, and then it will returnBackOff.STOP.
-
-
Constructor Summary
Constructors Constructor Description RetryBoundedBackOff(com.google.api.client.util.BackOff backoff, int maxRetries)RetryBoundedBackOff takes aBackOffand limits the retries.
-
-
-
Constructor Detail
-
RetryBoundedBackOff
public RetryBoundedBackOff(com.google.api.client.util.BackOff backoff, int maxRetries)RetryBoundedBackOff takes aBackOffand limits the retries.- Parameters:
maxRetries- Number of retries to attempt. Must be greater or equal to 0.backoff- The underlyingBackOffto use.
-
-
Method Detail
-
reset
public void reset() throws IOException- Specified by:
resetin interfacecom.google.api.client.util.BackOff- Throws:
IOException
-
nextBackOffMillis
public long nextBackOffMillis() throws IOException- Specified by:
nextBackOffMillisin interfacecom.google.api.client.util.BackOff- Throws:
IOException
-
-