ClockVector Class

Represents a clock vector in a knowledge structure. This class cannot be inherited.

Inheritance Hierarchy

System.Object
  Microsoft.Synchronization.ClockVector

Namespace:  Microsoft.Synchronization
Assembly:  Microsoft.Synchronization (in Microsoft.Synchronization.dll)

Syntax

'Declaration
Public NotInheritable Class ClockVector _
    Implements IClockVector, IList(Of IClockVectorElement),  _
    ICollection(Of IClockVectorElement), IEnumerable(Of IClockVectorElement), IEnumerable,  _
    IXmlSerializable
'Usage
Dim instance As ClockVector
public sealed class ClockVector : IClockVector, 
    IList<IClockVectorElement>, ICollection<IClockVectorElement>, IEnumerable<IClockVectorElement>, 
    IEnumerable, IXmlSerializable
public ref class ClockVector sealed : IClockVector, 
    IList<IClockVectorElement^>, ICollection<IClockVectorElement^>, IEnumerable<IClockVectorElement^>, 
    IEnumerable, IXmlSerializable
[<SealedAttribute>]
type ClockVector =  
    class
        interface IClockVector
        interface IList<IClockVectorElement>
        interface ICollection<IClockVectorElement>
        interface IEnumerable<IClockVectorElement>
        interface IEnumerable
        interface IXmlSerializable
    end
public final class ClockVector implements IClockVector, IList<IClockVectorElement>, ICollection<IClockVectorElement>, IEnumerable<IClockVectorElement>, IEnumerable, IXmlSerializable

The ClockVector type exposes the following members.

Constructors

  Name Description
Public method ClockVector Initializes a new instance of the ClockVector class.

Top

Properties

  Name Description
Public property Count Gets the number of elements that are contained in the clock vector.
Public property IsReadOnly Gets a value that indicates whether the element list is read-only.
Public property Item Gets or sets the element in the clock vector that is indicated by the value of index.

Top

Methods

  Name Description
Public method Add Adds an element to the clock vector.
Public method Clear Removes all items from the clock vector.
Public method Contains Determines whether the clock vector contains the specified element.
Public method CopyTo Copies the elements of the clock vector to array, starting at the index specified by arrayIndex.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetEnumerator Returns an enumerator that iterates through the clock vector elements.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method IndexOf Determines the index of a specific item in the clock vector element list.
Public method Insert Inserts an element into the clock vector at the specified index.
Protected method MemberwiseClone (Inherited from Object.)
Public method Remove Removes the first occurrence of a specific element from the clock vector.
Public method RemoveAt Removes the element at the specified index.
Public method ToString Returns a string that represents this object. (Overrides Object.ToString().)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Returns an enumerator that iterates through the collection of clock vector elements.
Explicit interface implemetationPrivate method IXmlSerializable.GetSchema Returns a null reference (Nothing in Visual Basic).
Explicit interface implemetationPrivate method IXmlSerializable.ReadXml Reconstitutes the object from its XML representation.
Explicit interface implemetationPrivate method IXmlSerializable.WriteXml Converts this object into its XML representation.

Top

Remarks

A clock vector defines the changes that are contained in a knowledge structure by using a list of ClockVectorElement objects. A ClockVectorElement object exists for each replica that has made a change that is contained in the knowledge. A change made by a particular replica is defined to be contained in the knowledge if the tick count for the change occurs between 0 and the tick count contained in ClockVectorElement that tracks that replica.

The members of IXmlSerializable and IEnumerable are implemented explicitly. Code that accesses them must first cast the ClockVector object to the IXmlSerializable or IEnumerable interface by using the casting operator or the as keyword.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Synchronization Namespace