Liking cljdoc? Tell your friends :D

kafka-clj.redis.single


_acquire-lockclj

(_acquire-lock pool lock-name timeout-ms wait-ms)

Attempts to acquire a distributed lock, returning an owner UUID iff successful.

Attempts to acquire a distributed lock, returning an owner UUID iff successful.
raw docstring

_have-lock?clj

(_have-lock? pool lock-name owner-uuid)

_release-lockclj

(_release-lock pool lock-name owner-uuid)

Attempts to release a distributed lock, returning true iff successful.

Attempts to release a distributed lock, returning true iff successful.
raw docstring

_wcarcljmacro

(_wcar conn-pool & body)
(_wcar conn-pool :as-pipeline & body)

The ConnectionPool returned from conn-pool must be the first argument to this macro Evaluates body in the context of a fresh thread-bound pooled connection to Redis server. Sends Redis commands to server as pipeline and returns the server's response. Releases connection back to pool when done. conn-opts arg is a map with connection pool and spec options: {:pool {} :spec {:host "127.0.0.1" :port 6379}} ; Default {:pool {} :spec {:uri "redis://redistogo:pass@panga.redistogo.com:9475/"}} {:pool {} :spec {:host "127.0.0.1" :port 6379 :password "secret" :timeout-ms 6000 :db 3}} A nil or {} conn-opts will use defaults. A :none pool can be used to skip connection pooling (not recommended). For other pool options, Ref. http://goo.gl/e1p1h3, http://goo.gl/Sz4uN1 (defaults). Note that because of thread-binding, you'll probably want to avoid lazy Redis command calls in wcar's body unless you know what you're doing. Compare: (wcar {} (for [k [:k1 :k2]] (car/set k :val)) ; Lazy, NO commands run (wcar {} (doseq [k [:k1 :k2]] (car/set k :val)) ; Not lazy, commands run See also with-replies.

The ConnectionPool returned from conn-pool must be the first argument to this macro
Evaluates body in the context of a fresh thread-bound pooled connection to
Redis server. Sends Redis commands to server as pipeline and returns the
server's response. Releases connection back to pool when done.
`conn-opts` arg is a map with connection pool and spec options:
  {:pool {} :spec {:host "127.0.0.1" :port 6379}} ; Default
  {:pool {} :spec {:uri "redis://redistogo:pass@panga.redistogo.com:9475/"}}
  {:pool {} :spec {:host "127.0.0.1" :port 6379
                   :password "secret"
                   :timeout-ms 6000
                   :db 3}}
A `nil` or `{}` `conn-opts` will use defaults. A `:none` pool can be used
to skip connection pooling (not recommended).
For other pool options, Ref. http://goo.gl/e1p1h3,
                             http://goo.gl/Sz4uN1 (defaults).
Note that because of thread-binding, you'll probably want to avoid lazy Redis
command calls in `wcar`'s body unless you know what you're doing. Compare:
`(wcar {} (for   [k [:k1 :k2]] (car/set k :val))` ; Lazy, NO commands run
`(wcar {} (doseq [k [:k1 :k2]] (car/set k :val))` ; Not lazy, commands run
See also `with-replies`.
raw docstring

close-poolclj

(close-pool {:keys [pool]})

conn-poolclj

(conn-pool spec pool-opts)

createclj

(create spec opts)

Main public function that should be called to create a Redis pool instance

Main public function that should be called to create a Redis pool instance
raw docstring

get-object-poolclj

(get-object-pool carmine-conn)

Internal helper function that returns the internal ObjectPool

Internal helper function that returns the internal ObjectPool
raw docstring

luaclj

(lua _ script)

nil-safeclj

(nil-safe v default)

pooled-connclj

(pooled-conn {:keys [pool]})

release-connclj

(release-conn {:keys [pool]} conn)

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

× close