trait RetryMiddleware extends AnyRef
Implement retry transparently for a Client as Middleware. For dynamics, this is a bit hard as the server could be busy but returns 500. Otherwise, other 500 errors maybe or maybe not should be retryable. The retry policies herein are based on specific statuses, specific OS likely retryable errors and errors caused potentially by mangled message bodies.
The new dynamics governer limits are in place and these retry policies take them into account via status TooManyRequests:
- See also
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/api-limits
- Alphabetic
- By Inheritance
- RetryMiddleware
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def backoff[F[_]](maxRetries: Int = 5, initialDelay: FiniteDuration = 5.seconds)(implicit eh: MonadError[F, Throwable], timer: Timer[F]): Middleware[F]
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def directly[F[_]](maxRetries: Int = 5)(implicit F: MonadError[F, Throwable]): Middleware[F]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
makeMiddleware[F[_]](retry: (F[DisposableResponse[F]]) ⇒ F[DisposableResponse[F]], isError: (Status) ⇒ Boolean = http.retry.shouldRetry)(implicit F: MonadError[F, Throwable], FM: FlatMap[F]): Middleware[F]
Construct middleware with retry strategies which ensure that responses with statuses known to be retryable are retried.
Construct middleware with retry strategies which ensure that responses with statuses known to be retryable are retried. The retry policy is embedded in the "retry" parameter. Therefore, your effect must be able to express "retry" semantics. "retry" is composed with the output from the Middlware's input Client. Your retry strategy may wish to filter on different types of errors so that not every
Throwable
causes a retry.makeSomeStatusesErrors
is automatically composed. -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def pause[F[_]](maxRetries: Int = 5, delayBetween: FiniteDuration = 5.seconds)(implicit F: MonadError[F, Throwable], timer: Timer[F]): Middleware[F]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )