SYNC_SAVE_ACTION Enumeration

Represents the type of action that is indicated by a change.

Syntax

typedef enum
{
  SSA_CREATE,
  SSA_UPDATE_VERSION_ONLY,
  SSA_UPDATE_VERSION_AND_DATA,
  SSA_UPDATE_VERSION_AND_MERGE_DATA,
  SSA_DELETE_AND_STORE_TOMBSTONE,
  SSA_DELETE_AND_REMOVE_TOMBSTONE,
  SSA_RENAME_SOURCE_AND_UPDATE_VERSION_AND_DATA,
  SSA_RENAME_DESTINATION_AND_UPDATE_VERSION_AND_DATA,
  SSA_DELETE_CONFLICTING_AND_SAVE_SOURCE_ITEM,
  SSA_STORE_MERGE_TOMBSTONE,
  SSA_CHANGE_ID_UPDATE_VERSION_AND_MERGE_DATA,
  SSA_CHANGE_ID_UPDATE_VERSION_AND_SAVE_DATA,
  SSA_CHANGE_ID_UPDATE_VERSION_AND_DELETE_AND_STORE_TOMBSTONE,
  SSA_CHANGE_ID_UPDATE_VERSION_ONLY,
  SSA_CREATE_GHOST,
  SSA_GHOST_ITEM,
  SSA_UNGHOST_ITEM,
  SSA_UPDATE_GHOST,
  SSA_DELETE_GHOST_AND_STORE_TOMBSTONE,
  SSA_DELETE_GHOST_WITHOUT_TOMBSTONE
}  SYNC_SAVE_ACTION;

Members

  • SSA_CREATE
    The item is new and is created in the destination item store. 

  • SSA_UPDATE_VERSION_ONLY
    Item data is not changed in the destination item store. The version is overwritten in the destination metadata. This action also occurs when the item from the destination provider is selected as the winner of a conflict.

  • SSA_UPDATE_VERSION_AND_DATA
    Item data is applied to the destination item store. Existing data is overwritten. The version that is provided overwrites the existing version in the destination metadata. This action corresponds to an item creation, item update, or change unit update in the source replica. This action also occurs when the item from the source provider is selected as the winner of a conflict.

  • SSA_UPDATE_VERSION_AND_MERGE_DATA
    Item data is applied to the destination item store. Existing item data is merged with the updated item data by using some provider-specific method. The version overwrites the existing version in the destination metadata. This action occurs when the conflict resolution action is SRA_MERGE.

  • SSA_DELETE_AND_STORE_TOMBSTONE
    The item is deleted from the destination item store. A tombstone is saved in the destination metadata. This action corresponds to deleting an item from the source replica.

  • SSA_DELETE_AND_REMOVE_TOMBSTONE
    The item is deleted from the destination item store. A tombstone is not retained in the destination metadata. If a tombstone exists for the item in the destination metadata, it must be removed. This action is invoked during forgotten knowledge recovery and corresponds to item deletes where the source replica has cleaned up the tombstone.

  • SSA_RENAME_SOURCE_AND_UPDATE_VERSION_AND_DATA
    The change sent from the source provider is renamed so that it no longer collides with the conflicting item on the destination replica, and the source change is applied to the destination replica.

  • SSA_RENAME_DESTINATION_AND_UPDATE_VERSION_AND_DATA
    The conflicting item on the destination replica is renamed so that it no longer collides with the change sent from the source provider, and the source change is applied to the destination replica.

  • SSA_DELETE_CONFLICTING_AND_SAVE_SOURCE_ITEM
    The source change is applied to the destination replica and the conflicting destination item is deleted from the destination replica.

  • SSA_STORE_MERGE_TOMBSTONE
    Store a merge tombstone in the destination metadata. Consider a merge action that specifies id1 as the losing item ID and id2 as the winning item ID. The merge tombstone contains id1 as the losing item ID and id2 as the winning item ID. If a merge tombstone already exists in the destination replica that contains id1 as the losing item ID and another item ID, id3, as the winning item ID, perform the following steps.

    1. If id2 is less than id3, create and store two merge tombstones. One merge tombstone contains id1 as the losing item ID and id2 as the winning item ID. The other merge tombstone contains id2 as the losing item ID and id3 as the winning item ID. This second merge tombstone may already exist, in which case it is simply left alone. In this way, a chain of merge tombstones is created, ordered by item ID.

    2. If id3 is less than id2, return an error.

  • SSA_CHANGE_ID_UPDATE_VERSION_AND_MERGE_DATA
    The data from the source item is combined with the destination item. Store a merge tombstone for the losing item ID, by following the same steps outlined for SSA_STORE_MERGE_TOMBSTONE.

  • SSA_CHANGE_ID_UPDATE_VERSION_AND_SAVE_DATA
    Store a merge tombstone for the losing item ID, by following the same steps outlined for SSA_STORE_MERGE_TOMBSTONE.

  • SSA_CHANGE_ID_UPDATE_VERSION_AND_DELETE_AND_STORE_TOMBSTONE
    Store a merge tombstone for the losing item ID, by following the same steps outlined for SSA_STORE_MERGE_TOMBSTONE. Delete the item identified by the winning item ID, and store a tombstone for it.

  • SSA_CHANGE_ID_UPDATE_VERSION_ONLY
    Store a merge tombstone for the losing item ID, by following the same steps outlined for SSA_STORE_MERGE_TOMBSTONE. Apply only metadata for the winning item change.

  • SSA_CREATE_GHOST
    Create a ghost for the item. A ghost is an item that contains both a value that indicates whether it was in the filter recently, and a move-out version. A move-out version indicates the version of the change that moved the item out of the filter.

  • SSA_GHOST_ITEM
    Change the active item to a ghost. To do this, store a value that indicates that the item was in the filter recently, store the version of this change as the move-out version for the item, and remove the item data from the item store.

  • SSA_UNGHOST_ITEM
    Activate the ghost item. To do this, remove the move-out version from the metadata, and store the item data in the item store.

  • SSA_UPDATE_GHOST
    Update the version for a ghost item. This is an update to the current version of the item, not the move-out version.

  • SSA_DELETE_GHOST_AND_STORE_TOMBSTONE
    Change a ghost item to a tombstone. This indicates that the item has been deleted. To do this, store a value that indicates the item has been deleted.

  • SSA_DELETE_GHOST_WITHOUT_TOMBSTONE
    Remove the ghost item from the metadata store and do not store a tombstone for the item.

Remarks

When the provider is not using a transaction for the whole change batch, the provider must retrieve updated knowledge from the ISaveChangeContext object and save this knowledge at the same time it applies the change.

Requirements

Header: Synchronization.h

See Also

Reference

ISaveChangeWithChangeUnitsContext Interface

ISynchronousNotifyingChangeApplierTarget Interface

IAsynchronousNotifyingChangeApplierTarget Interface

IFeedBuilder Interface

Concepts

Sync Framework Core Components