Share via


IReplicaMetadata Interface

Provides access to the replica metadata and item metadata in the metadata store. IReplicaMetadata also provides services for delete detection and helpers for implementing synchronization provider methods.

interface IReplicaMetadata : IUnknown

Members

IReplicaMetadata can be subdivided into the following conceptual groups.

Metadata for a Replica

The following members of IReplicaMetadata provide access to metadata that is associated with a replica as whole.

IReplicaMetadata methods Description

IReplicaMetadata::GetReplicaId

Gets the ID of the replica that is associated with this metadata.

IReplicaMetadata::GetNextTickCount

Increments the previously saved tick count for this replica, saves the new value to the store, and returns the new value.

IReplicaMetadata::GetKnowledge

Gets the current knowledge for this replica.

IReplicaMetadata::SetKnowledge

Sets the current knowledge for this replica.

IReplicaMetadata::GetForgottenKnowledge

Gets the forgotten knowledge for this replica.

IReplicaMetadata::SetForgottenKnowledge

Sets the forgotten knowledge for this replica.

IReplicaMetadata::GetCustomFieldMetadata

Gets the custom metadata field that is associated with this replica.

IReplicaMetadata::SetCustomFieldMetadata

Sets the custom metadata field that is associated with this replica.

IReplicaMetadata::SaveReplicaMetadata

Saves replica metadata property changes to the metadata store.

Note

Changes that are made on an instance of IReplicaMetadata 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 IReplicaMetadata provide access to metadata for items.

IReplicaMetadata methods Description

IReplicaMetadata::CreateEmptyFieldValue

Creates a new IFieldValue object that contains default values.

IReplicaMetadata::CreateNewItemMetadata

Creates a new IItemMetadata object that can be used to add a new item metadata entry to the metadata store.

IReplicaMetadata::SaveItemMetadata

Saves item metadata property changes to the metadata store.

IReplicaMetadata::RemoveItemMetadataByGlobalId

Removes item metadata from the metadata store.

IReplicaMetadata::FindItemMetadataByGlobalId

Gets item metadata for the item that has the specified global ID.

IReplicaMetadata::FindItemMetadataByUniqueIndexedFields

Returns the unique item metadata entry that has the specified value for the indexed field.

IReplicaMetadata::FindItemMetadataByIndexedFields

Returns a list of item metadata entries that have the specified value for the indexed field.

IReplicaMetadata::GetLastDeletedItemsCleanupTime

Gets the time when deleted items were last cleaned up by CleanupDeletedItems.

IReplicaMetadata::CleanupDeletedItems

Removes items that are marked as deleted if the specified time interval has passed since the last cleanup.

IReplicaMetadata::GetItemCount

Gets the total number of items in the metadata store and the number of deleted items in the metadata store.

Note

Property changes that are made on an instance of IItemMetadata will be saved to the metadata store only after SaveItemMetadata has been called.

Help for Synchronization Providers

The following members of IReplicaMetadata help implement synchronization provider methods.

IReplicaMetadata methods Description

IReplicaMetadata::GetItemBatchVersions

Gets a batch of changes that contains the versions of items that are stored in this replica. These items correspond to the items referred to in a batch of changes that is sent from some other provider.

IReplicaMetadata::GetFullEnumerationItemBatchVersions

Gets a change batch that contains the versions of items stored in this replica that correspond to the items referred to in a batch of changes that are sent from some other provider, as part of a full enumeration.

IReplicaMetadata::GetChangeBatch

Gets a change batch that contains item metadata for items that are not contained in the specified knowledge from the destination provider.

IReplicaMetadata::GetFilteredChangeBatch

Gets a change batch that contains item metadata for items that are not contained in the specified knowledge from the destination provider and that are accepted by the specified static filter or dynamic filter.

IReplicaMetadata::GetFullEnumerationChangeBatch

Gets a change batch that contains item metadata for items that have IDs greater than the specified lower bound, as part of a full enumeration.

Delete Detection

The delete detection service is a set of IReplicaMetadata methods that can be used to determine which items were deleted from the item store and, therefore, should be marked as deleted in the metadata store.

IReplicaMetadata methods Description

IReplicaMetadata::ResetReportingWatermark

Resets the delete detection service by marking all items as unreported.

IReplicaMetadata::ReportLiveItemByIndexedFields

Reports that the item that is identified by the indexed field value is active and should not be considered deleted.

IReplicaMetadata::ReportLiveItemByGlobalId

Reports that the specified item is active and should not be considered deleted.

IReplicaMetadata::GetUnreportedItems

Returns a list of items that are not currently marked as active in the metadata store and that are not already marked as deleted.

IReplicaMetadata::GetUnreportedItemsByIndexedFields

Returns a list of items that have the specified set of indexed field values, that are not currently marked as active in the metadata store, and that are not already marked as deleted.

Requirements

Header: Metastore.h

See Also

Concepts

Sync Framework Metadata Storage Service Components
Accessing Replica Metadata
Interoperating with a Provider
Detecting Deleted Items