IReplicaMetadata::GetNextTickCount

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

Syntax

HRESULT GetNextTickCount(
  ULONGLONG * pNextTickCount);

Parameters

  • pNextTickCount
    [out] The update tick count value for this replica.

Return Value

  • S_OK

  • E_POINTER

Remarks

The implementation of this class that is available through ISqlSyncMetadataStore immediately saves the incremented value to the store. If there is an outstanding explicit transaction, the operation will occur within that transaction and will be rolled back if the transaction is not committed or is rolled back.

This method is useful to providers mainly in one of the following circumstances:

  • Sync Framework calls ISynchronousNotifyingChangeApplierTarget::GetCurrentTickCount. Sync Framework expects the change applier target to return a new tick count value that it can use to assign a new local version for an item.

  • The provider is doing metadata maintenance on its store and has to assign new versions to changes that were made through some mechanism other than synchronization. A version for such a change can be constructed by combining the local replica key and the next tick count that is obtained by calling GetNextTickCount.

  • The provider is tracking updates on its store and wants to set a new version for every update that occurs. The new version can be created by combining the local replica key with the next tick count that is obtained by calling GetNextTickCount.

If a provider wants the current tick count instead of the next tick count, the provider can call IReplicaMetadata::GetKnowledge to get the current knowledge, and then extract the current tick count value from it.

See Also

Reference

IReplicaMetadata Interface