An implementation of vector clocks, heavily inspired by Basho's Riak Core.
An implementation of vector clocks, heavily inspired by Basho's Riak Core.
(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.
(entry counter timestamp)
Instantiates a new vclock entry
Instantiates a new vclock entry
(increment m node)
(increment m node tstamp)
Increments vlock by adding a new entry
Increments vlock by adding a new entry
(merge & vclocks)
Merge multiple VClocks into one
Merge multiple VClocks into one
(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
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close