Liking cljdoc? Tell your friends :D

severin.core

A library for implementing resource pools.

A library for implementing resource pools.
raw docstring

->factorycljmultimethod

Creates a factory from a URI by dispatching on the scheme.

Creates a factory from a URI by dispatching on the scheme.
sourceraw docstring

create!clj

(create! pool uri)

Tries to retrieve and recycle an already created resource from the pool. If no resource can be found a new one is created.

Tries to retrieve and recycle an already created resource from the pool. If
no resource can be found a new one is created.
sourceraw docstring

dispose!clj

(dispose! pool resource)
(dispose! pool uri resource)

Places a resource back in the pool or disposes it when maximum size is reached.

Places a resource back in the pool or disposes it when maximum size is reached.
sourceraw docstring

FactoryProtocolcljprotocol

-create!clj

(-create! this uri)

Creates a new resource from a URI.

Creates a new resource from a URI.

-dispose!clj

(-dispose! this resource)

Disposes a resource.

Disposes a resource.

-recycle!clj

(-recycle! this resource uri)

Recycles an existing resource and assigns a URI.

Recycles an existing resource and assigns a URI.

-valid?clj

(-valid? this resource)

Tests if a resource is still valid.

Tests if a resource is still valid.
source

make-poolclj

(make-pool & {:keys [max-size] :or {max-size 10}})

Returns a new Ref with an empty hash map as initial value.

Returns a new Ref with an empty hash map as initial value.
sourceraw docstring

uriclj

(uri resource)
source

URI->KeyProtocolcljprotocol

-uri->keyclj

(-uri->key this uri)

Converts a URI to a keyword.

Converts a URI to a keyword.
source

URIProtocolcljprotocol

-uriclj

(-uri this)

Returns the URI of a resource.

Returns the URI of a resource.
source

with-poolcljmacro

(with-pool pool bindings & body)

binding => [name uri ...] Evaluates body in a try expression with names bound to the values of the created resources. The finally clause calls dispose! on each name.

binding => [name uri ...]
Evaluates body in a try expression with names bound to the values of the
created resources. The finally clause calls dispose! on each name.
sourceraw docstring

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

× close