Liking cljdoc? Tell your friends :D

resilience.thread-pool-bulkhead


*bulkhead-name*clj

Contextual value represents bulkhead name

Contextual value represents bulkhead name
sourceraw docstring

*creation-time*clj

Contextual value represents event create time

Contextual value represents event create time
sourceraw docstring

bulkheadclj

(bulkhead name)
(bulkhead name config)

Create a thread pool bulkhead with a name and a default or custom configurations.

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

Please refer to thread-pool-bulkhead-config for allowed key value pairs within the bulkhead configurations map.

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

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

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

Create a thread pool bulkhead with a `name` and a default or custom configurations.

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

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

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

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

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

configclj

(config bulkhead)

Get the Metrics of this Bulkhead

Get the Metrics of this Bulkhead
sourceraw docstring

defbulkheadcljmacro

(defbulkhead name)
(defbulkhead name config)

Define a thread pool bulkhead under name with a default or custom configurations.

Please refer to thread-pool-bulkhead-config for allowed key value pairs within the bulkhead configuration.

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

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

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

Define a thread pool bulkhead under `name` with a default or custom configurations.

Please refer to `thread-pool-bulkhead-config` for allowed key value pairs
within the bulkhead configuration.

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

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

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

defregistrycljmacro

(defregistry name)
(defregistry name config)

Define a ThreadPoolBulkheadRegistry under name with a default or custom thread pool bulkhead configuration.

Please refer to thread-pool-bulkhead-config for allowed key value pairs within the configuration map.

Define a ThreadPoolBulkheadRegistry under `name` with a default or custom
thread pool bulkhead configuration.

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

get-all-thread-pool-bulkheadsclj

(get-all-thread-pool-bulkheads registry)

Get all thread pool bulkhead registered to this thread pool bulkhead registry instance

Get all thread pool bulkhead registered to this thread pool bulkhead registry instance
sourceraw docstring

metricsclj

(metrics bulkhead)

Get the ThreadPoolBulkheadConfig of this Bulkhead

Get the ThreadPoolBulkheadConfig of this Bulkhead
sourceraw docstring

nameclj

(name bulkhead)

Get the name of this Bulkhead

Get the name of this Bulkhead
sourceraw docstring

registry-with-configclj

(registry-with-config config)

Create a ThreadPoolBulkheadRegistry with a configurations map.

Please refer to thread-pool-bulkhead-config for allowed key value pairs within the configuration map.

Create a ThreadPoolBulkheadRegistry with a configurations map.

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

set-on-all-event-consumer!clj

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

set-on-call-finished-event-consumer!clj

(set-on-call-finished-event-consumer! bulkhead consumer-fn)
source

set-on-call-permitted-event-consumer!clj

(set-on-call-permitted-event-consumer! bulkhead consumer-fn)

set a consumer to consume on-call-permitted event which emitted when request permitted by bulkhead. consumer-fn accepts a function which takes no arguments.

Please note that in consumer-fn you can get the bulkhead name and the creation time of the consumed event by accessing *bulkhead-name* and *creation-time* under this namespace.

set a consumer to consume `on-call-permitted` event which emitted when request permitted by bulkhead.
`consumer-fn` accepts a function which takes no arguments.

Please note that in `consumer-fn` you can get the bulkhead name and the creation time of the
consumed event by accessing `*bulkhead-name*` and `*creation-time*` under this namespace.
sourceraw docstring

set-on-call-rejected-event-consumer!clj

(set-on-call-rejected-event-consumer! bulkhead consumer-fn)
source

thread-pool-bulkhead-configclj

(thread-pool-bulkhead-config opts)

Create a ThreadPoolBulkheadConfig.

Allowed options are:

  • :max-thread-pool-size Configures the max thread pool size.

  • :core-thread-pool-size Configures the core thread pool size.

  • :queue-capacity Configures the capacity of the queue.

  • :keep-alive-time When the number of threads is greater than the core, this is the maximum time in milliseconds that excess idle threads will wait for new tasks before terminating.

Create a ThreadPoolBulkheadConfig.

Allowed options are:
* :max-thread-pool-size
  Configures the max thread pool size.

* :core-thread-pool-size
  Configures the core thread pool size.

* :queue-capacity
  Configures the capacity of the queue.

* :keep-alive-time
  When the number of threads is greater than
  the core, this is the maximum time in milliseconds that excess idle threads
  will wait for new tasks before terminating.
 
sourceraw docstring

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

× close