コード例 #1
0
 private bool Equals(VectorClock other)
 {
     return(IsSameAs(other));
 }
コード例 #2
0
 /// <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));
 }
コード例 #3
0
 /// <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);
 }
コード例 #4
0
 /// <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);
 }
コード例 #5
0
 /// <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);
 }
コード例 #6
0
 /// <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);
 }
コード例 #7
0
ファイル: Gossip.cs プロジェクト: marcpiechura/akka.net
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="from">TBD</param>
 /// <param name="version">TBD</param>
 public GossipStatus(UniqueAddress from, VectorClock version)
 {
     _from    = from;
     _version = version;
 }
コード例 #8
0
ファイル: Gossip.cs プロジェクト: marcpiechura/akka.net
 /// <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));
 }
コード例 #9
0
ファイル: Gossip.cs プロジェクト: marcpiechura/akka.net
 /// <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())
 {
 }
コード例 #10
0
ファイル: Gossip.cs プロジェクト: marcpiechura/akka.net
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="members">TBD</param>
 public Gossip(ImmutableSortedSet <Member> members) : this(members, new GossipOverview(), VectorClock.Create())
 {
 }
コード例 #11
0
 public bool Equals(VectorClock other)
 {
     return(IsSameAs(other));
 }