Skip to content

Instantly share code, notes, and snippets.

@schroedermatt
Last active November 16, 2018 04:22
Show Gist options
  • Save schroedermatt/a64c15c2f04304793e67e8f7fe3d278e to your computer and use it in GitHub Desktop.
Save schroedermatt/a64c15c2f04304793e67e8f7fe3d278e to your computer and use it in GitHub Desktop.
A list of the available retry policies.
AlwaysRetryPolicy: A subclass of NeverRetryPolicy that is mainly used as a base for other policies (e.g. a test stub)
CircuitBreakerRetryPolicy: Trips circuit open after a given number of failures and stays open until a set timeout elapses
CompositeRetryPolicy: mix and match multiple policies (they will be called in the order given)
ExceptionClassifierRetryPolicy: specify different policies for different exception types
ExpressionRetryPolicy: subclass of SimpleRetryPolicy that evaluates an expression against the last thrown exception
NeverRetryPolicy: allows the first attempt but never permits a retry
SimpleRetryPolicy: retry a fixed number of times for a set of named exceptions (and subclasses)
TimeoutRetryPolicy: allows a retry as long as it hasn’t timed out (clock is started on a call to RetryContext)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment