Liking cljdoc? Tell your friends :D

eva.utils


ensure-avl-sorted-set-byclj

(ensure-avl-sorted-set-by comp col)

If col is an AVLMap sorted using comparator comp then returns col unchanged. Else creates AVLMap sorted by comp from col

If col is an AVLMap sorted using comparator comp
then returns col unchanged.
Else creates AVLMap sorted by comp from col
sourceraw docstring

ensure-sorted-avl*clj

source

fillclj

(fill fill-val [c0 c1 c2 c3])

Appends a fill value to the end of a vector until it's length is 4.

Appends a fill value to the end of a vector until it's length is 4.
sourceraw docstring

init-log-infoclj

(init-log-info)
source

init-tx-eidclj

source

init-tx-timeclj

source

oneclj

(one coll)

Returns nil or the first item of a collection. If there is more than one item in the collection throws exception.

Returns nil or the first item of a collection.
If there is more than one item in the collection throws exception.
sourceraw docstring

thread-localcljmacro

(thread-local & body)

Takes a body of expressions, and returns a java.lang.ThreadLocal object. (see http://download.oracle.com/javase/6/docs/api/java/lang/ThreadLocal.html). To get the current value of the thread-local binding, you must deref (@) the thread-local object. The body of expressions will be executed once per thread and future derefs will be cached. Note that while nothing is preventing you from passing these objects around to other threads (once you deref the thread-local, the resulting object knows nothing about threads), you will of course lose some of the benefit of having thread-local objects.

Takes a body of expressions, and returns a java.lang.ThreadLocal object.
(see http://download.oracle.com/javase/6/docs/api/java/lang/ThreadLocal.html).
To get the current value of the thread-local binding, you must deref (@) the
thread-local object. The body of expressions will be executed once per thread
and future derefs will be cached.
Note that while nothing is preventing you from passing these objects around
to other threads (once you deref the thread-local, the resulting object knows
nothing about threads), you will of course lose some of the benefit of having
thread-local objects.
sourceraw docstring

thread-local*clj

(thread-local* init)

Non-macro version of thread-local - see documentation for same.

Non-macro version of thread-local - see documentation for same.
sourceraw docstring

with-retriescljmacro

(with-retries strategy warn-msg & body)

Try executing body. If body throws an Exception, retry according to the retry strategy. A retry strategy is a seq of delays: with-retries will sleep the duration of the delay (in ms) between each retry. The total number of tries is the number of elements in the strategy plus one. A simple retry strategy would be: [100 100 100 100] which results in the operation being retried four times (for a total of five tries) with 100ms sleeps in between tries. Note: that infinite strategies are supported, but maybe not encouraged... Strategies can be built with the provided builder fns, eg linear-strategy, but you can also create any custom seq of delays that suits your use case.

Try executing `body`. If `body` throws an Exception, retry
according to the retry `strategy`.
A retry `strategy` is a seq of delays: `with-retries` will sleep the
duration of the delay (in ms) between each retry. The total number
of tries is the number of elements in the `strategy` plus one. A
simple retry strategy would be: [100 100 100 100] which results in
the operation being retried four times (for a total of five tries)
with 100ms sleeps in between tries. Note: that infinite strategies
are supported, but maybe not encouraged...
Strategies can be built with the provided builder fns, eg
`linear-strategy`, but you can also create any custom seq of
delays that suits your use case.
sourceraw docstring

with-retries*clj

(with-retries* strategy f)
(with-retries* strategy warn-msg f)
source

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

× close