Liking cljdoc? Tell your friends :D


Idiomatic connection pools in Clojure.

Based on Dirigiste.

Clojars Project


(require [biiwide.deepend.alpha.pool :as pool])

Fixed object pool with health check on acquire:

(-> (pool/fixed-pool
      {:generate (fn [key] ...)
       :destroy  (fn [key obj] ...)
       :max-objects-per-key 10
       :max-objects-total   10})
      (fn healthy-object? [key obj])
      {:on-acquire true
       :on-release false}))

Utilization pool:

  {:generate (fn [key] ...)
   :destroy  (fn [key obj] ...)
   :target-utilization 1.0
   :max-objects-per-key 5
   :max-objects-total 15})


Copyright © 2018 Ted Cushman

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Edit on GitHub

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

× close