Class RetryPolicy


  • @Immutable
    final class RetryPolicy
    extends java.lang.Object
    Retry policy data object.
    • Constructor Summary

      Constructors 
      Constructor Description
      RetryPolicy​(int maxAttempts, long initialBackoffNanos, long maxBackoffNanos, double backoffMultiplier, java.lang.Long perAttemptRecvTimeoutNanos, java.util.Set<Status.Code> retryableStatusCodes)
      The caller is supposed to have validated the arguments and handled throwing exception or logging warnings already, so we avoid repeating args check here.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • maxAttempts

        final int maxAttempts
      • initialBackoffNanos

        final long initialBackoffNanos
      • maxBackoffNanos

        final long maxBackoffNanos
      • backoffMultiplier

        final double backoffMultiplier
      • perAttemptRecvTimeoutNanos

        @Nullable
        final java.lang.Long perAttemptRecvTimeoutNanos
      • retryableStatusCodes

        final java.util.Set<Status.Code> retryableStatusCodes
    • Constructor Detail

      • RetryPolicy

        RetryPolicy​(int maxAttempts,
                    long initialBackoffNanos,
                    long maxBackoffNanos,
                    double backoffMultiplier,
                    @Nullable
                    java.lang.Long perAttemptRecvTimeoutNanos,
                    @Nonnull
                    java.util.Set<Status.Code> retryableStatusCodes)
        The caller is supposed to have validated the arguments and handled throwing exception or logging warnings already, so we avoid repeating args check here.
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object