DataCacheItemVersion.CompareTo Method
Used to compare two versions of the same item, specified with the same key.
Namespace: Microsoft.ApplicationServer.Caching
Assembly: Microsoft.ApplicationServer.Caching.Core (in microsoft.applicationserver.caching.core.dll)
Usage
'Usage
Dim instance As DataCacheItemVersion
Dim other As DataCacheItemVersion
Dim returnValue As Integer
returnValue = instance.CompareTo(other)
Syntax
'Declaration
Public Function CompareTo ( _
other As DataCacheItemVersion _
) As Integer
public int CompareTo (
DataCacheItemVersion other
)
public:
virtual int CompareTo (
DataCacheItemVersion^ other
) sealed
public final int CompareTo (
DataCacheItemVersion other
)
public final function CompareTo (
other : DataCacheItemVersion
) : int
Parameters
- other
The DataCacheItemVersion to be compared.
Return Value
An Int32value: 0 if the versions are equal, greater than zero if the instance is greater than the version parameter value, or less than zero if the instance is less than the version parameter value.
Remarks
Version comparisons are only meaningful when comparing versions of the same item, specified with the same key. It is not possible to deduce order by comparing versions from different keys; this method may return a result, but the result is only valid for versions of the same key.
The DataCacheItemVersion is updated every time that the object is updated. Only the latest version of the object is stored on the cache cluster. Due to the distributed nature of the cluster, the cache client may not have the latest copy of the object. For this reason, the DataCacheItemVersion class is essential for concurrency operations. For more information, see Concurrency Models (Velocity) and Concurrency Methods (Velocity).
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.
Platforms
Development Platforms
Visual Studio 2010 and later, .NET Framework 4
Target Platforms
Windows 7; Windows Server 2008 R2; Windows Server 2008 Service Pack 2; Windows Vista Service Pack 2
See Also
Reference
DataCacheItemVersion Class
DataCacheItemVersion Members
Microsoft.ApplicationServer.Caching Namespace
ff425062(v=azure.10).md 2011-08-26