Class Retryer

java.lang.Object
org.apache.hadoop.fs.impl.prefetch.Retryer

public class Retryer extends Object
Provides retry related functionality.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Retryer(int perRetryDelay, int maxDelay, int statusUpdateInterval)
    Initializes a new instance of the Retryer class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if retrying should continue, false otherwise.
    boolean
    Returns true if status update interval has been reached.

    Methods inherited from class java.lang.Object

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

    • Retryer

      public Retryer(int perRetryDelay, int maxDelay, int statusUpdateInterval)
      Initializes a new instance of the Retryer class.
      Parameters:
      perRetryDelay - per retry delay (in ms).
      maxDelay - maximum amount of delay (in ms) before retry fails.
      statusUpdateInterval - time interval (in ms) at which status update would be made.
      Throws:
      IllegalArgumentException - if perRetryDelay is zero or negative.
      IllegalArgumentException - if maxDelay is less than or equal to perRetryDelay.
      IllegalArgumentException - if statusUpdateInterval is zero or negative.
  • Method Details

    • continueRetry

      public boolean continueRetry()
      Returns true if retrying should continue, false otherwise.
      Returns:
      true if the caller should retry, false otherwise.
    • updateStatus

      public boolean updateStatus()
      Returns true if status update interval has been reached.
      Returns:
      true if status update interval has been reached.