Liking cljdoc? Tell your friends :D

celtuce.pool


conn-poolclj

(conn-pool connector cmds-fn)
(conn-pool {:keys [redis-client stateful-conn codec] :as connector}
           cmds-fn
           options)

Create a ConnectionPoolImpl that wraps a ConnectionPoolSupport. Takes a connector and a command function that will be called on pooled connections. Last parameter (options) allows to fully customize your pool based on Apache2 GenericObjectPoolConfig; you have two options: pass a map with keys max-idle, min-idle and max-total or a org.apache.commons.pool2.impl.GenericObjectPoolConfig

Create a ConnectionPoolImpl that wraps a ConnectionPoolSupport.
Takes a connector and a command function that will be called on pooled connections.
Last parameter (options) allows to fully customize your pool based on Apache2 GenericObjectPoolConfig;
you have two options: pass a map with keys max-idle, min-idle and max-total or a org.apache.commons.pool2.impl.GenericObjectPoolConfig
raw docstring

ConnectionPoolcljprotocol

Functions for using the connection pool

Functions for using the connection pool

borrow-connclj

(borrow-conn this)

closeclj

(close this)

return-connclj

(return-conn this conn)
raw docstring

ConnectionPoolImplclj


pool-configclj

(pool-config {:keys [max-total max-idle min-idle]
              :or {max-total GenericObjectPoolConfig/DEFAULT_MAX_TOTAL
                   max-idle GenericObjectPoolConfig/DEFAULT_MAX_IDLE
                   min-idle GenericObjectPoolConfig/DEFAULT_MIN_IDLE}})

Internal helper to build GenericObjectPoolConfig from a map

Internal helper to build GenericObjectPoolConfig from a map
raw docstring

with-conn-poolcljmacro

(with-conn-pool conn-pool cmds-name & body)

Takes a ConnectionPool coon-pool and a cmds-name symbol that will be bound to the command function of the pool called on a borrowed connection

Takes a ConnectionPool `coon-pool` and a `cmds-name` symbol that will be bound to
the command function of the pool called on a borrowed connection
raw docstring

with-conn-pool*cljmacro

(with-conn-pool* conn-pool cmds-name conn-name & body)

Like with-conn-pool but also binds the pooled connection to conn-name. User is responsible for returning it to the pool within body

Like with-conn-pool but also binds the pooled connection to `conn-name`.
User is responsible for returning it to the pool within `body`
raw docstring

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

× close