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 of BackOff that limits the number of calls on another BackOff. This class will call the same methods of another BackOff until the maximum number of retries are reached, and then it will return BackOff.STOP.
  • Field Summary

    Fields inherited from interface com.google.api.client.util.BackOff

    STOP, STOP_BACKOFF, ZERO_BACKOFF
  • Constructor Summary

    Constructors
    Constructor
    Description
    RetryBoundedBackOff(com.google.api.client.util.BackOff backoff, int maxRetries)
    RetryBoundedBackOff takes a BackOff and limits the retries.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RetryBoundedBackOff

      public RetryBoundedBackOff(com.google.api.client.util.BackOff backoff, int maxRetries)
      RetryBoundedBackOff takes a BackOff and limits the retries.
      Parameters:
      maxRetries - Number of retries to attempt. Must be greater or equal to 0.
      backoff - The underlying BackOff to use.
  • Method Details

    • reset

      public void reset() throws IOException
      Specified by:
      reset in interface com.google.api.client.util.BackOff
      Throws:
      IOException
    • nextBackOffMillis

      public long nextBackOffMillis() throws IOException
      Specified by:
      nextBackOffMillis in interface com.google.api.client.util.BackOff
      Throws:
      IOException