Returns the registered instance of the sentry (when applicable).
Returns the registered instance of the sentry (when applicable).
Append a concurrency limit sentry to the current sentry.
Append a concurrency limit sentry to the current sentry.
number of concurrently allowed invocations
a new sentry that applies a concurrency limit after the current sentry behavior
Append a invocation duration limit sentry to the current sentry.
Append a invocation duration limit sentry to the current sentry.
WARNING: do NOT use this sentry when you invoke it from 1) a akka.dispatch.Future or 2) an akka.actor.Actor. For such circumstances you are MUCH better of with a timeout on the enclosing future or a timeout message within the actor. Reason: this sentry blocks the current thread while waiting on a future that executes the task. Blocking the current thread is an anti-pattern for futures and actors.
the maximum duration of a call in millis
a new sentry that applies a duration limit after the current sentry behavior
Append a circuit breaker sentry to the current sentry.
Append a circuit breaker sentry to the current sentry.
number of failure after which the flow will be broken
timeout for trying again
a new sentry that applies a circuit breaker after the current sentry behavior
Append a metrics sentry to the current sentry.
Append a metrics sentry to the current sentry.
Four timers are registered: "all", "success", "fail" and "notAvailable". These are update for respectively each invocation, succeeding invocations, invocations that throw an exception, and invocations that are blocked by a sentry that is later in the chain (detected by catching NotAvailableExceptions).
When 4 timers is too much detail, use .withSimpleMetrics instead.
a new sentry that collects metrics after the current sentry behavior
Append a rate limit sentry to the current sentry.
Append a rate limit sentry to the current sentry.
number of invocations per time unit
the time unit in millis
a new sentry that applies a concurrency limit after the current sentry behavior
Append a custom sentry to the current sentry.
Append a custom sentry to the current sentry.
a new sentry that applies the given sentry after the current sentry behavior
Append a metrics sentry to the current sentry.
Append a metrics sentry to the current sentry.
One timer is registered: "all". It is update for each invocation. For more information, use .withMetrics instead.
a new sentry that collects metrics after the current sentry behavior