Sdílet prostřednictvím


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)

Syntax

'Declaration
Public MustOverride Function GetFullEnumerationChangeBatch ( _
    batchSize As UInteger, _
    lowerEnumerationBound As SyncId, _
    destinationKnowledge As SyncKnowledge _
) As FullEnumerationChangeBatch
'Usage
Dim instance As ReplicaMetadata
Dim batchSize As UInteger
Dim lowerEnumerationBound As SyncId
Dim destinationKnowledge As SyncKnowledge
Dim returnValue As FullEnumerationChangeBatch

returnValue = instance.GetFullEnumerationChangeBatch(batchSize, lowerEnumerationBound, destinationKnowledge)
public abstract FullEnumerationChangeBatch GetFullEnumerationChangeBatch (
    uint batchSize,
    SyncId lowerEnumerationBound,
    SyncKnowledge destinationKnowledge
)
public:
virtual FullEnumerationChangeBatch^ GetFullEnumerationChangeBatch (
    unsigned int batchSize, 
    SyncId^ lowerEnumerationBound, 
    SyncKnowledge^ destinationKnowledge
) abstract
public abstract FullEnumerationChangeBatch GetFullEnumerationChangeBatch (
    UInt32 batchSize, 
    SyncId lowerEnumerationBound, 
    SyncKnowledge destinationKnowledge
)
public abstract function GetFullEnumerationChangeBatch (
    batchSize : uint, 
    lowerEnumerationBound : SyncId, 
    destinationKnowledge : SyncKnowledge
) : FullEnumerationChangeBatch

Parameters

  • batchSize
    The size of the change batch to return.
  • lowerEnumerationBound
    The lower bound for item IDs. This method should return changes that have IDs greater than or equal to this ID value.
  • destinationKnowledge
    The knowledge of the destination provider.

Return Value

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

Exceptions

Exception type Condition

ObjectDisposedException

The object has been disposed or was not initialized correctly.

ArgumentOutOfRangeException

batchSize is 0.

ArgumentNullException

lowerEnumerationBound is a null reference (Nothing in Visual Basic), or destinationKnowledge is a null reference (Nothing in Visual Basic).

Remarks

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.

See Also

Reference

ReplicaMetadata Class
ReplicaMetadata Members
Microsoft.Synchronization.MetadataStorage Namespace