Sdílet prostřednictvím


IChangeApplicationServices Interface

Represents a change application service object that can be used to perform change application actions individually.

interface IChangeApplicationServices : IUnknown

Members

IChangeApplicationServices method Description

IChangeApplicationServices::Initialize

Initializes the change application service object. This method must be called before any other methods.

IChangeApplicationServices::BeginChangeApplication

Begins processing of a set of changes.

IChangeApplicationServices::BeginFullEnumerationChangeApplication

Begins processing of a set of changes as part of a recovery synchronization.

IChangeApplicationServices::EndChangeApplication

Ends processing of a set of changes.

IChangeApplicationServices::EndFullEnumerationChangeApplication

Ends processing of a set of changes as part of a recovery synchronization.

IChangeApplicationServices::SetDestinationKnowledge

Sets the destination knowledge that is used to calculate the updated destination knowledge as changes are applied.

IChangeApplicationServices::GetUpdatedDestinationKnowledge

Gets the updated destination knowledge that contains all of the changes that have been applied so far.

IChangeApplicationServices::GetChangeApplicationContext

Gets an object that represents the current change to be applied.

IChangeApplicationServices::ReportItemChangeApplied

Notifies the change application service that an item change has been successfully applied to the destination replica.

IChangeApplicationServices::ReportChangeUnitChangeApplied

Notifies the change application service that a change unit change has been successfully applied to the destination replica.

IChangeApplicationServices::ReportRecoverableErrorOnItemChange

Notifies the change application service that a recoverable error occurred when the destination provider tried to apply the item change.

IChangeApplicationServices::ReportRecoverableErrorOnChangeUnitChange

Notifies the change application service that a recoverable error occurred when the destination provider tried to apply the change unit change.

Remarks

The IChangeApplicationServices interface is part of the change application service of Sync Framework, which is used when a provider requires greater flexibility than that allowed by the standard change applier provided by Sync Framework. For example, a provider must defer the application of certain changes to the end of the synchronization session. The standard change applier does not allow this. The provider can use the change application service to handle conflict detection and knowledge calculation while still retaining the ability to defer changes as necessary.

For a provider that does not need the extra flexibility of the change application service, it can be easier to use a standard change applier, such as ISynchronousNotifyingChangeApplier.

The change application service is typically used by a destination provider to help implement its IKnowledgeSyncProvider::ProcessChangeBatch and IKnowledgeSyncProvider::ProcessFullEnumerationChangeBatch methods. To use the change application service, perform the following steps:

  1. Obtain an IChangeApplicationServices object by passing IID_IChangeApplicationServices to the IProviderSyncServices::CreateChangeApplier method.

  2. Initialize the object by calling IChangeApplicationServices::Initialize.

  3. Start processing of a change batch by calling IChangeApplicationServices::BeginChangeApplication, or start processing of a recovery synchronization change batch by calling IChangeApplicationServices::BeginFullEnumerationChangeApplication. Typically this method is called one time for each change batch to be processed.

  4. Enumerate the changes in the change batch. Call IChangeApplicationServices::GetChangeApplicationContext one time for each change and use the returned IChangeApplicationContext object to apply the change.

  5. Report changes as successfully applied by calling IChangeApplicationServices::ReportItemChangeApplied or IChangeApplicationServices::ReportChangeUnitChangeApplied. Report changes a failing to apply by calling IChangeApplicationServices::ReportRecoverableErrorOnItemChange or IChangeApplicationServices::ReportRecoverableErrorOnChangeUnitChange.

  6. Call IChangeApplicationServices::GetUpdatedDestinationKnowledge at any time to retrieve the updated destination knowledge that contains all of the changes applied so far.

  7. End processing of a change batch by calling IChangeApplicationServices::EndChangeApplication, or end processing of a recovery synchronization change batch by calling IChangeApplicationServices::EndFullEnumerationChangeApplication. Save the updated destination knowledge and destination forgotten knowledge objects that are returned by this method.

  8. Repeat steps 3 through 7 for each change batch received by the destination provider.

Requirements

Header: Synchronization.h

See Also

Concepts

Sync Framework Core Components