Liking cljdoc? Tell your friends :D

clojurewerkz.vclock.core

An implementation of vector clocks, heavily inspired by Basho's Riak Core.

An implementation of vector clocks, heavily inspired by Basho's Riak Core.
raw docstring

descends?clj

(descends? one other)

Returns true if +one+ is a direct descendant of +other+, false otherwise.

A vlock is its own descendant. Any vlock is a descendant of an empty vclock.

Returns true if +one+ is a direct descendant of +other+, false otherwise.

A vlock is its own descendant. Any vlock is a descendant of an empty vclock.
sourceraw docstring

entryclj

(entry counter timestamp)

Instantiates a new vclock entry

Instantiates a new vclock entry
sourceraw docstring

freshclj

(fresh & kv)

Returns a fresh VClock

Returns a fresh VClock
sourceraw docstring

incrementclj

(increment m node)
(increment m node tstamp)

Increments vlock by adding a new entry

Increments vlock by adding a new entry
sourceraw docstring

mergeclj

(merge & vclocks)

Merge multiple VClocks into one

Merge multiple VClocks into one
sourceraw docstring

pruneclj

(prune
  vclock
  &
  {:keys [small-vclock big-vclock young-vclock old-vclock]
   :or {small-vclock 10 big-vclock 20 young-vclock 20 old_vclock (* 24 60 60)}
   :as options})

Prunes (possibly minimizes) vclocks and returns a new version. Used to limit vector clock growth.

See http://wiki.basho.com/Vector-Clocks.html for more information about vector clocks.

Accepted options:

:small-vclock (default: 10): vclock with the number of entries less than or equal to this value are not pruned :big-vclock (default: 20): vclocks with more entries than this value will be pruned down to this many latest entries :young-vclock (default: 20 seconds) :old-vclock (default: 24 hours): vlock entries older than this value (in seconds) will be pruned

Prunes (possibly minimizes) vclocks and returns a new version. Used to limit vector clock growth.

See http://wiki.basho.com/Vector-Clocks.html for more information about vector clocks.

Accepted options:

:small-vclock (default: 10): vclock with the number of entries less than or equal to this value are not pruned
:big-vclock (default: 20): vclocks with more entries than this value will be pruned down to this many latest entries
:young-vclock (default: 20 seconds)
:old-vclock (default: 24 hours): vlock entries older than this value (in seconds) will be pruned
sourceraw docstring

timestamp-in-secondsclj

(timestamp-in-seconds)
source

VClockEntryclj

source

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

× close