private bool Equals(VectorClock other) { return(IsSameAs(other)); }
/// <summary> /// <para> /// Compares the current vector clock with the supplied vector clock. The outcome will be one of the following: /// </para> /// <ol> /// <li><![CDATA[ Clock 1 is SAME(==) as Clock 2 iff for all i c1(i) == c2(i) ]]></li> /// <li><![CDATA[ Clock 1 is BEFORE(<) Clock 2 iff for all i c1(i) <= c2(i) and there exist a j such that c1(j) < c2(j) ]]></li> /// <li><![CDATA[ Clock 1 is AFTER(>) Clock 2 iff for all i c1(i) >= c2(i) and there exist a j such that c1(j) > c2(j). ]]></li> /// <li><![CDATA[ Clock 1 is CONCURRENT(<>) to Clock 2 otherwise. ]]></li> /// </ol> /// </summary> /// <param name="that">The vector clock used to compare against.</param> /// <returns>TBD</returns> public Ordering CompareTo(VectorClock that) { return(CompareOnlyTo(that, Ordering.FullOrder)); }
/// <summary> /// Returns true if <code>this</code> is after <code>that</code> else false. /// </summary> /// <param name="that">The other <see cref="VectorClock"/> to check.</param> /// <returns><c>true</c> if this vectorclock comes after the one we're comparing.</returns> public bool IsAfter(VectorClock that) { return(CompareOnlyTo(that, Ordering.After) == Ordering.After); }
/// <summary> /// Returns true if this VectorClock has the same history as the 'that' VectorClock else false. /// </summary> /// <param name="that">The other <see cref="VectorClock"/> to check.</param> /// <returns><c>true</c> if this vectorclock is the same as the one we're comparing.</returns> public bool IsSameAs(VectorClock that) { return(CompareOnlyTo(that, Ordering.Same) == Ordering.Same); }
/// <summary> /// Returns true if <code>this</code> and <code>that</code> are concurrent else false. /// </summary> /// <param name="that">The other <see cref="VectorClock"/> to check.</param> /// <returns><c>true</c> if both vector clocks contain concurrent modifications that need to be merged.</returns> public bool IsConcurrentWith(VectorClock that) { return(CompareOnlyTo(that, Ordering.Concurrent) == Ordering.Concurrent); }
/// <summary> /// Returns true if <code>this</code> is before <code>that</code> else false. /// </summary> /// <param name="that">The other <see cref="VectorClock"/> to check.</param> /// <returns><c>true</c> if this vectorclock comes before the one we're comparing.</returns> public bool IsBefore(VectorClock that) { return(CompareOnlyTo(that, Ordering.Before) == Ordering.Before); }
/// <summary> /// TBD /// </summary> /// <param name="from">TBD</param> /// <param name="version">TBD</param> public GossipStatus(UniqueAddress from, VectorClock version) { _from = from; _version = version; }
/// <summary> /// TBD /// </summary> /// <param name="members">TBD</param> /// <param name="overview">TBD</param> /// <param name="version">TBD</param> /// <returns>TBD</returns> public Gossip Copy(ImmutableSortedSet <Member> members = null, GossipOverview overview = null, VectorClock version = null) { return(new Gossip(members ?? _members, overview ?? _overview, version ?? _version)); }
/// <summary> /// TBD /// </summary> /// <param name="members">TBD</param> /// <param name="overview">TBD</param> public Gossip(ImmutableSortedSet <Member> members, GossipOverview overview) : this(members, overview, VectorClock.Create()) { }
/// <summary> /// TBD /// </summary> /// <param name="members">TBD</param> public Gossip(ImmutableSortedSet <Member> members) : this(members, new GossipOverview(), VectorClock.Create()) { }
public bool Equals(VectorClock other) { return(IsSameAs(other)); }