References
http://research.microsoft.com/en-us/um/people/lamport/pubs/time-clocks.pdf
http://homes.cs.washington.edu/~arvind/cs425/doc/mattern89virtual.pdfbinary_vclock() = binary()
The timestamp is present but not used, in case a client wishes to inspect it.
counter() = integer()
vc_entry() = {vclock_node(), counter()}
vclock() = [vc_entry()]
vclock_node() = term()
| all_nodes/1 | Return the list of all nodes that have ever incremented VClock. |
| descends/2 | Return true if Va is a direct descendant of Vb, else false -- remember, a vclock is its own descendant! |
| dominates/2 | |
| equal/2 | Compares two VClocks for equality. |
| fresh/0 | Create a brand new vclock. |
| from_binary/1 | takes the output of to_binary/1 and returns a vclock. |
| get_counter/2 | Get the counter value in VClock set from Node. |
| glb/2 | take two vclocks and return a vclock that summerizes only the events both have seen. |
| increment/2 | Increment VClock at Node. |
| merge/1 | Combine all VClocks in the input list into their least possible common descendant. |
| subtract_dots/2 | subtract the VClock from the DotList. |
| to_binary/1 | an effecient format for disk / wire. |
all_nodes(VClock::vclock()) -> [vclock_node()]
Return the list of all nodes that have ever incremented VClock.
Return true if Va is a direct descendant of Vb, else false -- remember, a vclock is its own descendant!
Compares two VClocks for equality.
fresh() -> vclock()
Create a brand new vclock.
from_binary(Bin::binary_vclock()) -> vclock()
takes the output of to_binary/1 and returns a vclock
get_counter(Node::vclock_node(), VClock::vclock()) -> counter()
Get the counter value in VClock set from Node.
take two vclocks and return a vclock that summerizes only the events both have seen.
increment(Node::vclock_node(), VClock::vclock()) -> vclock()
Increment VClock at Node.
Combine all VClocks in the input list into their least possible common descendant.
subtract the VClock from the DotList.
what this means is that any {actor(), count()} pair in
DotList that is <= an entry in VClock is removed from DotList
Example [{a, 3}, {b, 2}, {d, 14}, {g, 22}] -
[{a, 4}, {b, 1}, {c, 1}, {d, 14}, {e, 5}, {f, 2}] =
[{{b, 2}, {g, 22}]
to_binary(Clock::vclock()) -> binary_vclock()
an effecient format for disk / wire. 5 @see from_binary/1
Generated by EDoc