Liking cljdoc? Tell your friends :D

pool.core


addclj

(add pool)
(add pool key)

Adds an object to pool and passivate it. Returns nil.

Adds an object to pool and passivate it. Returns nil.
sourceraw docstring

borrowclj

(borrow pool)
(borrow pool key)
source

clearclj

(clear pool)
(clear pool key)

Clear idle objects in pool.

Clear idle objects in pool.
sourceraw docstring

closeclj

(close pool)
source

get-keypoolclj

(get-keypool make
             &
             {:keys [destroy validate activate passivate]
              :or {destroy ignore
                   validate (fn [k o] true)
                   activate ignore
                   passivate ignore}})

Returns a keypool with user provided methods for handling objects. Other kwargs can be passed for finer control but are optional.

make must be function with single arguments for key and rest kwargs are function with two arity for key and the object.

Returns a keypool with user provided methods for handling objects.
Other kwargs can be passed for finer control but are optional.

`make` must be function with single arguments for key and rest kwargs are
function with two arity for key and the object.
sourceraw docstring

get-poolclj

(get-pool
  make
  &
  {:keys [destroy validate activate passivate]
   :or
     {destroy ignore validate (fn [o] true) activate ignore passivate ignore}})

Returns a pool with user provided methods for handling objects. Other kwargs can be passed for finer control but are optional.

make must be a function with no arguments and rest kwargs are function with single arity for the object. activate and passivate are meant to be mutating functions for any effect on the pooled object. validate must return truthly value.

Returns a pool with user provided methods for handling objects.
Other kwargs can be passed for finer control but are optional.

`make` must be a function with no arguments and rest kwargs are function with
single arity for the object.
`activate` and `passivate` are meant to be mutating functions for any effect
on the pooled object.
`validate` must return truthly value.
sourceraw docstring

returnclj

(return pool object)
(return pool key object)
source

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

× close