ReplicaMetadata::GetFullEnumerationChangeBatch Method

When overridden in a derived class, gets a change batch that contains item metadata for items that have IDs equal to or greater than the specified lower bound, as part of a full enumeration.

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

public:
virtual FullEnumerationChangeBatch^ GetFullEnumerationChangeBatch(
	unsigned int batchSize, 
	SyncId^ lowerEnumerationBound, 
	SyncKnowledge^ destinationKnowledge
) abstract

Parameters

batchSize
Type: System::UInt32
The size of the change batch to return.
lowerEnumerationBound
Type: Microsoft.Synchronization::SyncId
The lower bound for item IDs. This method should return changes that have IDs greater than or equal to this ID value.
destinationKnowledge
Type: Microsoft.Synchronization::SyncKnowledge
The knowledge of the destination provider.

Return Value

Type: Microsoft.Synchronization::FullEnumerationChangeBatch
A change batch that contains item metadata for items that have IDs equal to or greater than the specified lower bound.

ExceptionCondition
ObjectDisposedException

The object has been disposed or was not initialized correctly.

ArgumentOutOfRangeException

batchSize is 0.

ArgumentNullException

lowerEnumerationBound is a nullptr, or destinationKnowledge is a nullptr.

This method helps a synchronization provider implement its GetFullEnumerationChangeBatch method. This method is called during forgotten knowledge recovery.

Before providers call this method, they must ensure that the versions in the metadata store reflect all local changes, including deletes. This is achieved by an explicit metadata maintenance pass to enumerate items and update their metadata.

The implementation of this class that is available through SqlMetadataStore adds changes to the change batch in global ID order.

The implementation of this class that is available through SqlMetadataStore also returns all items that have IDs less than lowerEnumerationBound that are not contained in destinationKnowledge.

The implementation of this class that is available through SqlMetadataStore sets IsLastBatch to true on the returned change batch when there are no more changes to send.

Notes to Implementers

This method must enumerate, in sorted order by item ID, changes that have an item ID of lowerEnumerationBound or greater. This enables Sync Framework to determine which items on the destination provider have been deleted but forgotten by the source provider.

If there are no more changes to send after this batch, IsLastBatch must be set to true on the returned change batch, or Sync Framework will call GetChangeBatch again to retrieve another batch of changes.

For a provider that sends item data along with item change metadata, destinationKnowledge can be used to determine whether it is necessary to send item data. Item data does not have to be sent when the item change is contained in destinationKnowledge.

Show: