Share via


RelationalSyncProvider Class

Abstracts a generic synchronization provider that communicates with a database and shields the synchronization agent from the specific implementation of the database.

This API is not CLS-compliant. 

Inheritance Hierarchy

System.Object
  Microsoft.Synchronization.SyncProvider
    Microsoft.Synchronization.KnowledgeSyncProvider
      Microsoft.Synchronization.Data.RelationalSyncProvider
        Microsoft.Synchronization.Data.DbSyncProvider
        Microsoft.Synchronization.Data.SqlServer.SqlSyncProvider
        Microsoft.Synchronization.Data.SqlServerCe.SqlCeSyncProvider

Namespace:  Microsoft.Synchronization.Data
Assembly:  Microsoft.Synchronization.Data (in Microsoft.Synchronization.Data.dll)

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
Public MustInherit Class RelationalSyncProvider _
    Inherits KnowledgeSyncProvider _
    Implements IDisposable
'Usage
Dim instance As RelationalSyncProvider
[CLSCompliantAttribute(false)]
public abstract class RelationalSyncProvider : KnowledgeSyncProvider, 
    IDisposable
[CLSCompliantAttribute(false)]
public ref class RelationalSyncProvider abstract : public KnowledgeSyncProvider, 
    IDisposable
[<AbstractClassAttribute>]
[<CLSCompliantAttribute(false)>]
type RelationalSyncProvider =  
    class
        inherit KnowledgeSyncProvider
        interface IDisposable
    end
public abstract class RelationalSyncProvider extends KnowledgeSyncProvider implements IDisposable

The RelationalSyncProvider type exposes the following members.

Constructors

  Name Description
Protected method RelationalSyncProvider Initializes a new instance of the RelationalSyncProvider class.

Top

Properties

  Name Description
Public property BatchingDirectory Gets or sets the directory in which batch files are spooled to disk.
Public property CleanupBatchingDirectory Gets or sets whether to clean up batching files after the changes in the files have been applied to the destination.
Public property Configuration Not implemented by RelationalSyncProvider. An exception of type NotSupportedException is thrown if you attempt to access this property.
Public property Connection Gets or sets an IDbConnection object that is used to connect to the database.
Public property DestinationCallbacks Gets an object that a synchronization application can use to register to receive notification of events that occur during synchronization. (Inherited from KnowledgeSyncProvider.)
Public property IdFormats Gets a SyncIdFormatGroup object that is used to identify entities in a synchronization session. (Overrides KnowledgeSyncProvider.IdFormats.)
Public property MemoryDataCacheSize Gets or sets the maximum amount of memory (in KB) that Sync Framework uses to cache changes before spooling those changes to disk.
Public property ScopeName Gets or sets the name of the scope to synchronize.
Public property SyncProviderPosition Gets or sets a SyncProviderPosition enumeration value that represents whether a provider is associated with the local or remote database.

Top

Methods

  Name Description
Public method BeginSession Called by the SyncOrchestrator to indicate that a synchronization session has started. (Overrides KnowledgeSyncProvider.BeginSession(SyncProviderPosition, SyncSessionContext).)
Protected method CreateApplicationTransaction Creates a read-committed transaction over which to apply changes to the database.
Protected method CreateEnumerationTransaction Creates a read-committed transaction over which to enumerate changes from the database.
Public method Dispose() Releases all resources that are used by the RelationalSyncProvider.
Protected method Dispose(Boolean) Releases the unmanaged resources used by the RelationalSyncProvider and optionally releases the managed resources.
Public method EndSession Called by the SyncOrchestrator object to indicate that a synchronization session has ended. (Overrides KnowledgeSyncProvider.EndSession(SyncSessionContext).)
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetChangeBatch Gets a batch of changes to synchronize when given batch size, destination knowledge, and change data retriever parameters. (Overrides KnowledgeSyncProvider.GetChangeBatch(UInt32, SyncKnowledge, Object%).)
Public method GetFullEnumerationChangeBatch Gets a batch of changes to synchronize when given batch size, lower bound, knowledge, and change data retriever parameters. (Overrides KnowledgeSyncProvider.GetFullEnumerationChangeBatch(UInt32, SyncId, SyncKnowledge, Object%).)
Public method GetHashCode (Inherited from Object.)
Public method GetSyncBatchParameters Gets the number of kilobytes of data that will be included in change batches, and the current knowledge for the synchronization scope. (Overrides KnowledgeSyncProvider.GetSyncBatchParameters(UInt32%, SyncKnowledge%).)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method OnApplyChangeFailed Raises the ApplyMetadataFailed event.
Protected method OnApplyingChanges Raises the ApplyingChanges event.
Protected method OnApplyMetadataFailed Raises the ApplyMetadataFailed event.
Protected method OnChangesApplied Raises the ChangesApplied event.
Protected method OnChangesSelected Raises the ChangesSelected event.
Protected method OnDbConnectionFailure Raises the DbConnectionFailure event.
Protected method OnPeerOutdated Raises the SyncPeerOutdated event.
Protected method OnSelectingChanges Raises the SelectingChanges event.
Protected method OnSyncProgress Raises the SyncProgress event.
Public method ProcessChangeBatch Processes a batch of changes when given resolution policy, source changes, change data retriever, callback, and statistics parameters. (Overrides KnowledgeSyncProvider.ProcessChangeBatch(ConflictResolutionPolicy, ChangeBatch, Object, SyncCallbacks, SyncSessionStatistics).)
Public method ProcessFullEnumerationChangeBatch Processes a batch of changes when given resolution policy, source changes, change data retriever, callback, and statistics parameters. (Overrides KnowledgeSyncProvider.ProcessFullEnumerationChangeBatch(ConflictResolutionPolicy, FullEnumerationChangeBatch, Object, SyncCallbacks, SyncSessionStatistics).)
Public method ToString (Inherited from Object.)

Top

Events

  Name Description
Public event ApplyChangeFailed Occurs during uploading, after failing to apply a row at a node.
Public event ApplyingChanges Occurs during uploading, after connecting to the database but before applying changes.
Public event ApplyMetadataFailed Occurs during uploading, after failing to apply metadata for a row.
Public event BatchApplied Occurs after each batch of changes has been applied to the destination.
Public event BatchSpooled Occurs after each batch of changes has been written to disk.
Public event ChangesApplied Occurs during uploading, after applying changes but before disconnecting from the database.
Public event ChangesSelected Occurs during downloading, after enumerating changes but before disconnecting from the database.
Public event DbConnectionFailure Occurs when the database connection fails during change application.
Public event SelectingChanges Occurs during downloading, after connecting to the database but before selecting changes.
Public event SyncPeerOutdated Occurs before enumeration of changes if the destination node is outdated.
Public event SyncProgress Occurs during the selection of changes (per table) and the application of changes (per row).

Top

Remarks

In most cases, applications will use one of the classes that inherits from this class: SqlSyncProvider, SqlCeSyncProvider, or DbSyncProvider.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Synchronization.Data Namespace