(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.
(clear pool)
(clear pool key)
Clear idle objects in pool.
Clear idle objects in pool.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close