ReplicaMetadata Class
When overridden, provides access to the replica metadata and item metadata in the metadata store. ReplicaMetadata also provides services for delete detection and helpers for implementing synchronization provider methods.
Namespace: Microsoft.Synchronization.MetadataStorage
Assembly: Microsoft.Synchronization.MetadataStorage (in microsoft.synchronization.metadatastorage.dll)
Syntax
'Declaration
Public MustInherit Class ReplicaMetadata
'Usage
Dim instance As ReplicaMetadata
public abstract class ReplicaMetadata
public ref class ReplicaMetadata abstract
public abstract class ReplicaMetadata
public abstract class ReplicaMetadata
Remarks
ReplicaMetadata can be subdivided into the following conceptual groups.
Metadata for a Replica
The following members of ReplicaMetadata provide access to metadata that is associated with a replica as whole.
Member |
Description |
---|---|
Gets or sets the custom metadata field that is associated with this replica. |
|
Gets or sets the forgotten knowledge for this replica. |
|
Increments the previously saved tick count for this replica, saves the new value to the store, and returns the new value. |
|
Gets the ID format schema for the replica. |
|
Gets or sets the current knowledge for this replica. |
|
Gets the ID of the replica that is associated with this metadata. |
|
Gets the total number of items in the metadata store and the number of deleted items in the metadata store. |
Note
Changes that are made on an instance of ReplicaMetadata by using these properties or methods will be saved to the metadata store only after SaveReplicaMetadata has been called.
Metadata for Items
The following members of ReplicaMetadata provide access to metadata for items.
Member |
Description |
---|---|
Removes items that are marked as deleted and that are older than the last successful cleanup time. |
|
Creates a new item metadata object that can be used to add a new item metadata entry to the metadata store. |
|
FindItemMetadataById, FindItemMetadataByIndexedField, FindItemMetadataByIndexedFields, FindItemMetadataByUniqueIndexedField, FindItemMetadataByUniqueIndexedFields |
Gets item metadata for the item that is identified by the specified ID or index value. |
Gets the time when deleted items were last cleaned up by CleanupDeletedItems. |
|
Removes item metadata from the metadata store. |
Note
Property changes that are made on an instance of ItemMetadata will be saved to the metadata store only after SaveItemMetadata has been called.
Help for Synchronization Providers
The following members of ReplicaMetadata help implement synchronization provider methods.
Member |
Description |
---|---|
GetChangeBatch, GetFilteredChangeBatch, GetFullEnumerationChangeBatch |
Helps implement the KnowledgeSyncProvider method of the same name by returning a change batch filled with the appropriate set of changes. |
Helps implement the ProcessFullEnumerationChangeBatch or ProcessChangeBatch methods of KnowledgeSyncProvider by returning a batch of changes that contains the versions of items that are stored in this replica. |
Delete Detection
The ReplicaMetadata.DeleteDetector property provides access to a DeleteDetector object that can be used to determine which items were deleted from the replica and, therefore, should be marked as deleted in the metadata store.
Notes to Inheritors: When you inherit from ReplicaMetadata, you must override all members except IdFormats and ReplicaId.
Inheritance Hierarchy
System.Object
Microsoft.Synchronization.MetadataStorage.ReplicaMetadata
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
ReplicaMetadata Members
Microsoft.Synchronization.MetadataStorage Namespace