Liking cljdoc? Tell your friends :D

curator.distributed-atomic-long

Implements distributed atomic long.

https://curator.apache.org/curator-recipes/distributed-atomic-long.html
raw docstring

add!clj

(add! distributed-atomic-long delta)

Add delta to the current value. Return true on success, false otherwise.

Add delta to the current value. Return true on success, false otherwise.
sourceraw docstring

current-valueclj

(current-value distributed-atomic-long)

Return the current value of a DistributedAtomicLong

Return the current value of a DistributedAtomicLong
sourceraw docstring

decrement!clj

(decrement! distributed-atomic-long)

Subtract 1 from the current value. Return true on success, false otherwise.

Subtract 1 from the current value. Return true on success, false otherwise.
sourceraw docstring

distributed-atomic-longclj

(distributed-atomic-long curator-framework counter-path retry-policy)

Create a distributed atomic long in optimistic mode.

Requires the following parameters:

After each operation you MUST first check succeeded() which returns true if the operation succeeded.

Create a distributed atomic long in optimistic mode.

Requires the following parameters:
- curator-framework: instance of Curator
- counter-path: path of the counter (as a string)
- retry-policy: a retry policy, see http://curator.apache.org/apidocs/index.html

After each operation you MUST first check succeeded() which returns true
if the operation succeeded.
sourceraw docstring

force-set!clj

(force-set! distributed-atomic-long value)

Forcibly sets the value of the counter without any guarantees of atomicity.

Forcibly sets the value of the counter without any guarantees of atomicity.
sourceraw docstring

increment!clj

(increment! distributed-atomic-long)

Add 1 to the current value. Return true on success, false otherwise.

Add 1 to the current value. Return true on success, false otherwise.
sourceraw docstring

subtract!clj

(subtract! distributed-atomic-long delta)

Subtract delta from the current value. Return true on success, false otherwise.

Subtract delta from the current value. Return true on success, false otherwise.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close