IReplicaMetadata::GetFullEnumerationChangeBatch
Gets a change batch that contains item metadata for items that have IDs greater than or equal to the specified lower bound, as part of a full enumeration.
HRESULT GetFullEnumerationChangeBatch(
DWORD dwBatchSize,
const BYTE * pbLowerEnumerationBound,
ISyncKnowledge * pSyncKnowledge,
ISyncFullEnumerationChangeBatch ** ppSyncChangeBatch);
Parameters
- dwBatchSize
[in] The size of the change batch to return.
- pbLowerEnumerationBound
[in] The lower bound for item IDs. This method returns changes with IDs greater than or equal to this ID value.
- pSyncKnowledge
[in] The knowledge of the destination replica.
- ppSyncChangeBatch
[out] Returns the batch of changes.
Return Value
S_OK
E_POINTER
E_INVALIDARG when dwBatchSize is 0.
Remarks
This method helps a synchronization provider implement its IKnowledgeSyncProvider::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 ISqlSyncMetadataStore adds changes to the change batch in global ID order.
The implementation of this class, which is available through ISqlSyncMetadataStore, also returns all items that have IDs less than pbLowerEnumerationBound that are not contained in pSyncKnowledge.
The implementation of this class that is available through ISqlSyncMetadataStore calls SetLastBatch on the returned change batch when there are no more changes to send.
Notes for Implementers
This method must enumerate, in sorted order by item ID, changes that have an item ID of pbLowerEnumerationBound 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, SetLastBatch must be called on the returned change batch, or Sync Framework will call IKnowledgeSyncProvider::GetFullEnumerationChangeBatch again to retrieve another batch of changes.
For a provider that sends item data along with item change metadata, pSyncKnowledge 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 pSyncKnowledge.