Class RetryPolicy

java.lang.Object
io.grpc.internal.RetryPolicy

@Immutable final class RetryPolicy extends Object
Retry policy data object.
  • Field Details

    • maxAttempts

      final int maxAttempts
    • initialBackoffNanos

      final long initialBackoffNanos
    • maxBackoffNanos

      final long maxBackoffNanos
    • backoffMultiplier

      final double backoffMultiplier
    • perAttemptRecvTimeoutNanos

      @Nullable final Long perAttemptRecvTimeoutNanos
    • retryableStatusCodes

      final Set<Status.Code> retryableStatusCodes
  • Constructor Details

    • RetryPolicy

      RetryPolicy(int maxAttempts, long initialBackoffNanos, long maxBackoffNanos, double backoffMultiplier, @Nullable Long perAttemptRecvTimeoutNanos, @Nonnull 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 Details