Class RateLimitException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceException
io.smallrye.faulttolerance.api.RateLimitException
All Implemented Interfaces:
Serializable

public class RateLimitException extends org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceException
The exception thrown when an invocation exceeds the configured rate limit.
See Also:
  • Constructor Details

    • RateLimitException

      public RateLimitException()
    • RateLimitException

      public RateLimitException(long retryAfterMillis)
    • RateLimitException

      public RateLimitException(Throwable t)
    • RateLimitException

      public RateLimitException(long retryAfterMillis, Throwable t)
    • RateLimitException

      public RateLimitException(String message)
    • RateLimitException

      public RateLimitException(long retryAfterMillis, String message)
    • RateLimitException

      public RateLimitException(String message, Throwable t)
    • RateLimitException

      public RateLimitException(long retryAfterMillis, String message, Throwable t)
  • Method Details

    • getRetryAfterMillis

      public long getRetryAfterMillis()
      Returns the number of milliseconds after which the user may retry the rejected invocation. Retrying sooner is guaranteed to be rejected again. Note that this information is accurate only at the time the invocation is rejected. It may be invalidated by any subsequent or concurrent invocations, so there is no guarantee that a retry attempt after the given number of milliseconds will in fact be permitted.

      Returns a negative number when the information is not known.

      Returns:
      the minimum number of milliseconds after which retrying makes sense