Liking cljdoc? Tell your friends :D

resilience.retry


*creation-time*clj

Contextual value represents event create time

Contextual value represents event create time
sourceraw docstring

*retry-name*clj

Contextual value represents retry name

Contextual value represents retry name
sourceraw docstring

configclj

(config retry)

Get the RetryConfig of this Retry

Get the RetryConfig of this Retry
sourceraw docstring

defregistrycljmacro

(defregistry name)
(defregistry name configs)

Define a RetryRegistry under name with a default or custom retry configuration.

Please refer to retry-config for allowed key value pairs within the retry configuration map.

Define a RetryRegistry under `name` with a default or custom
retry configuration.

Please refer to `retry-config` for allowed key value pairs
within the retry configuration map.
sourceraw docstring

defretrycljmacro

(defretry name)
(defretry name config)

Define a retry under name with a default or custom retry configuration.

Please refer to retry-config for allowed key value pairs within the retry configuration.

If you want to register this retry to a RetryRegistry, you need to put :registry key with a RetryRegistry in the config argument. If you do not provide any other configurations, the newly created retry will inherit retry configurations from this provided RetryRegistry Example: (defretry my-retry {:registry my-registry})

If you want to register this retry to a RetryRegistry and you want to use new retry configurations to overwrite the configurations inherited from the registered RetryRegistry, you need not only provide the :registry key with the RetryRegistry in config argument but also provide other retry configurations you'd like to overwrite. Example: (defretry my-retry {:registry my-registry :max-attempts 5 :wait-millis 5000})

If you only want to create a retry and not register it to any RetryRegistry, you just need to provide retry configuration in config argument without :registry keyword.

Define a retry under `name` with a default or custom retry configuration.

Please refer to `retry-config` for allowed key value pairs
within the retry configuration.

If you want to register this retry to a RetryRegistry,
you need to put :registry key with a RetryRegistry in the `config`
argument. If you do not provide any other configurations, the newly created
retry will inherit retry configurations from this
provided RetryRegistry
Example:
(defretry my-retry {:registry my-registry})

If you want to register this retry to a RetryRegistry
and you want to use new retry configurations to overwrite the configurations
inherited from the registered RetryRegistry,
you need not only provide the :registry key with the RetryRegistry in `config`
argument but also provide other retry configurations you'd like to overwrite.
Example:
(defretry my-retry {:registry my-registry
                    :max-attempts 5
                    :wait-millis 5000})

If you only want to create a retry and not register it to any
RetryRegistry, you just need to provide retry configuration in `config`
argument without :registry keyword.
sourceraw docstring

get-all-retriesclj

(get-all-retries registry)

Get all retries registered to this retry registry instance

Get all retries registered to this retry registry instance
sourceraw docstring

metricsclj

(metrics retry)

Get the Metrics of this Retry

Get the Metrics of this Retry
sourceraw docstring

nameclj

(name retry)

Get the name of this Retry.

Get the name of this Retry.
sourceraw docstring

registry-with-configclj

(registry-with-config config)

Create a RetryRegistry with a retry configurations map.

Please refer to retry-config for allowed key value pairs within the retry configuration map.

Create a RetryRegistry with a retry configurations map.

Please refer to `retry-config` for allowed key value pairs
within the retry configuration map.
sourceraw docstring

retryclj

(retry name)
(retry name config)

Create a retry with a name and a default or custom retry configuration.

The name argument is only used to register this newly created retry to a RetryRegistry. If you don't want to bind this retry with a RetryRegistry, the name argument is ignored.

Please refer to retry-config for allowed key value pairs within the retry configurations map.

If you want to register this retry to a RetryRegistry, you need to put :registry key with a RetryRegistry in the config argument. If you do not provide any other configurations, the newly created retry will inherit retry configurations from this provided RetryRegistry Example: (retry my-retry {:registry my-registry})

If you want to register this retry to a RetryRegistry and you want to use new retry configurations to overwrite the configurations inherited from the registered RetryRegistry, you need not only provide the :registry key with the RetryRegistry in config argument but also provide other retry configurations you'd like to overwrite. Example: (retry my-retry {:registry my-registry :max-attempts 5 :wait-millis 5000})

If you only want to create a retry and not register it to any RetryRegistry, you just need to provide retry configurations in config argument. The name argument is ignored.

Create a retry with a `name` and a default or custom retry configuration.

The `name` argument is only used to register this newly created retry
to a RetryRegistry. If you don't want to bind this retry with
a RetryRegistry, the `name` argument is ignored.

Please refer to `retry-config` for allowed key value pairs
within the retry configurations map.

If you want to register this retry to a RetryRegistry,
you need to put :registry key with a RetryRegistry in the `config`
argument. If you do not provide any other configurations, the newly created
retry will inherit retry configurations from this
provided RetryRegistry
Example:
(retry my-retry {:registry my-registry})

If you want to register this retry to a RetryRegistry
and you want to use new retry configurations to overwrite the configurations
inherited from the registered RetryRegistry,
you need not only provide the :registry key with the RetryRegistry in `config`
argument but also provide other retry configurations you'd like to overwrite.
Example:
(retry my-retry {:registry my-registry
                 :max-attempts 5
                 :wait-millis 5000})

If you only want to create a retry and not register it to any
RetryRegistry, you just need to provide retry configurations in `config`
argument. The `name` argument is ignored.
sourceraw docstring

retry-configclj

(retry-config opts)

Create a RetryConfig.

Allowed options are:

  • :max-attempts Configures max retry times. Default value is 3.

  • :wait-millis Configures the wait interval time in milliseconds. Between every retry must wait this much time then retry next time. Must be greater than 10. Default value is 500.

  • :retry-on-result Configures a function which evaluates if an result should be retried. The function must return true if the result should be retried, otherwise it must return false.

  • :interval-function Set a function to modify the waiting interval after a failure. By default the interval stays the same.

  • :retry-on-exception Configures a function which takes a throwable as argument and evaluates if an exception should be retried. The function must return true if the exception should count be retried, otherwise it must return false.

    :retry-exceptions Configures a list of error classes that are recorded as a failure and thus increase the failure rate. Any exception matching or inheriting from one of the list will be retried, unless ignored via :ignore-exceptions. Ignoring an exception has priority over retrying an exception. Example: {:retry-exceptions [Throwable] :ignore-exceptions [RuntimeException]} would retry all Errors and checked Exceptions, and ignore unchecked. For a more sophisticated exception management use the :retry-on-exception configuration.

    :ignore-exceptions Configures a list of error classes that are ignored and thus are not retried. Any exception matching or inheriting from one of the list will not be retried, even if marked via :retry-exceptions. Ignoring an exception has priority over retrying an exception. Example: {:ignore-exceptions [Throwable] :retry-exceptions [Exception]} would capture nothing. Example: {:ignore-exceptions [Exception] :retry-exceptions [Throwable]} would capture Errors. For a more sophisticated exception management use the :retry-on-exception function

Create a RetryConfig.

Allowed options are:
* :max-attempts
  Configures max retry times.
  Default value is 3.

* :wait-millis
  Configures the wait interval time in milliseconds. Between every retry must wait this
  much time then retry next time.
  Must be greater than 10. Default value is 500.

* :retry-on-result
  Configures a function which evaluates if an result should be retried.
  The function must return true if the result should be retried, otherwise it must return false.

* :interval-function
  Set a function to modify the waiting interval after a failure.
  By default the interval stays the same.

* :retry-on-exception
  Configures a function which takes a throwable as argument and evaluates if an exception
  should be retried.
  The function must return true if the exception should count be retried, otherwise it must return false.

  :retry-exceptions
  Configures a list of error classes that are recorded as a failure and thus increase
  the failure rate. Any exception matching or inheriting from one of the list will be retried,
  unless ignored via :ignore-exceptions. Ignoring an exception has priority over retrying an exception.
  Example:
  {:retry-exceptions [Throwable]
   :ignore-exceptions [RuntimeException]}
  would retry all Errors and checked Exceptions, and ignore unchecked.
  For a more sophisticated exception management use the :retry-on-exception configuration.

  :ignore-exceptions
  Configures a list of error classes that are ignored and thus are not retried.
  Any exception matching or inheriting from one of the list will not be retried, even if marked via :retry-exceptions.
  Ignoring an exception has priority over retrying an exception.
  Example:
  {:ignore-exceptions [Throwable]
   :retry-exceptions [Exception]}
  would capture nothing.
  Example:
  {:ignore-exceptions [Exception]
   :retry-exceptions [Throwable]}
  would capture Errors.
  For a more sophisticated exception management use the :retry-on-exception function
 
sourceraw docstring

set-on-all-event-consumer!clj

(set-on-all-event-consumer! retry consumer-fn-map)
source

set-on-error-event-consumer!clj

(set-on-error-event-consumer! retry consumer-fn)
source

set-on-ignored-error-event-consumer!clj

(set-on-ignored-error-event-consumer! retry consumer-fn)
source

set-on-retry-event-consumer!clj

(set-on-retry-event-consumer! retry consumer-fn)
source

set-on-success-event-consumer!clj

(set-on-success-event-consumer! retry consumer-fn)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close