DbOutdatedSyncException Class
The exception that is thrown for errors that occur when trying to synchronize a peer that has outdated metadata.
System.Object
System.Exception
Microsoft.Synchronization.SyncException
Microsoft.Synchronization.Data.DbSyncException
Microsoft.Synchronization.Data.DbOutdatedSyncException
System.Exception
Microsoft.Synchronization.SyncException
Microsoft.Synchronization.Data.DbSyncException
Microsoft.Synchronization.Data.DbOutdatedSyncException
Assembly: Microsoft.Synchronization.Data (in Microsoft.Synchronization.Data.dll)
The DbOutdatedSyncException type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | DbOutdatedSyncException() | Initializes a new instance of the DbOutdatedSyncException class by using default values. |
![]() | DbOutdatedSyncException(String) | Initializes a new instance of the DbOutdatedSyncException class by using a message parameter. |
![]() | DbOutdatedSyncException(SerializationInfo, StreamingContext) | Initializes a new instance of the DbOutdatedSyncException class by using serialization information and streaming context parameters. |
![]() | DbOutdatedSyncException(String, Exception) | Initializes a new instance of the DbOutdatedSyncException class by using message and inner exception parameters. |
| Name | Description | |
|---|---|---|
![]() | Data | (Inherited from Exception.) |
![]() | DbSyncStage | Gets or sets a DbSyncStage enumeration value that represents the stage of synchronization during which the error occurred. (Inherited from DbSyncException.) |
![]() | ErrorNumber | Obsolete. Gets or sets an error number for the exception. (Inherited from SyncException.) |
![]() | HelpLink | Gets or sets the URL of a help page with information about the exception. (Inherited from DbSyncException.) |
![]() | HResult | (Inherited from Exception.) |
![]() | InnerException | (Inherited from Exception.) |
![]() | Message | (Inherited from Exception.) |
![]() | MissingCleanupKnowledge | Gets or sets a ForgottenKnowledge object that contains metadata about cleanup knowledge that the peer is missing. |
![]() | OutdatedPeerSyncKnowledge | Gets or sets a SyncKnowledge object that contains metadata about knowledge the peer has that is outdated. |
![]() | Source | (Inherited from Exception.) |
![]() | StackTrace | (Inherited from Exception.) |
![]() | SyncProviderPosition | Gets or sets the SyncProviderPosition enumeration value that represents whether a provider is associated with the local or remote database. |
![]() | SyncSource | Gets or sets the name of the component that threw the exception. (Inherited from DbSyncException.) |
![]() | SyncStage | Obsolete. Gets or sets a SyncStage enumeration value that represents the stage of synchronization during which the error occurred. (Inherited from SyncException.) |
![]() | TargetSite | (Inherited from Exception.) |
| Name | Description | |
|---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetBaseException | (Inherited from Exception.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetObjectData | Populates a SerializationInfo object with information about the exception. (Overrides DbSyncException.GetObjectData(SerializationInfo, StreamingContext).) |
![]() | GetType | (Inherited from Exception.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Exception.) |
The following code example synchronizes three peers and handles exceptions of type DbOutdatedSyncException.
//The SampleStats class handles information from the SyncStatistics //object that the Synchronize method returns. SampleStats sampleStats = new SampleStats(); try { //Initial synchronization. Instantiate the SyncOrchestrator //and call Synchronize. Note that data is not synchronized during the //session between peer 1 and peer 3, because all rows have already //been delivered to peer 3 during its synchronization session with peer 2. SyncOrchestrator sampleSyncAgent; SyncOperationStatistics syncStatistics; sampleSyncAgent = new SampleSyncAgent(Utility.ConnStr_DbSync1, Utility.ConnStr_DbSync2); syncStatistics = sampleSyncAgent.Synchronize(); sampleStats.DisplayStats(syncStatistics, "initial"); sampleSyncAgent = new SampleSyncAgent(Utility.ConnStr_DbSync2, Utility.ConnStr_DbSync3); syncStatistics = sampleSyncAgent.Synchronize(); sampleStats.DisplayStats(syncStatistics, "initial"); sampleSyncAgent = new SampleSyncAgent(Utility.ConnStr_DbSync1, Utility.ConnStr_DbSync3); syncStatistics = sampleSyncAgent.Synchronize(); sampleStats.DisplayStats(syncStatistics, "initial"); } catch (DbOutdatedSyncException ex) { Console.WriteLine("Outdated Knowledge: " + ex.OutdatedPeerSyncKnowledge.ToString() + " Clean up knowledge: " + ex.MissingCleanupKnowledge.ToString()); } catch (Exception ex) { Console.WriteLine(ex.Message); }
'The SampleStats class handles information from the SyncStatistics 'object that the Synchronize method returns. Dim sampleStats As New SampleStats() Try 'Initial synchronization. Instantiate the SyncOrchestrator 'and call Synchronize. Note that data is not synchronized during the 'session between peer 1 and peer 3, because all rows have already 'been delivered to peer 3 during its synchronization session with peer 2. Dim sampleSyncAgent As SyncOrchestrator Dim syncStatistics As SyncOperationStatistics sampleSyncAgent = New SampleSyncAgent(Utility.ConnStr_DbSync1, Utility.ConnStr_DbSync2) syncStatistics = sampleSyncAgent.Synchronize() sampleStats.DisplayStats(syncStatistics, "initial") sampleSyncAgent = New SampleSyncAgent(Utility.ConnStr_DbSync2, Utility.ConnStr_DbSync3) syncStatistics = sampleSyncAgent.Synchronize() sampleStats.DisplayStats(syncStatistics, "initial") sampleSyncAgent = New SampleSyncAgent(Utility.ConnStr_DbSync1, Utility.ConnStr_DbSync3) syncStatistics = sampleSyncAgent.Synchronize() sampleStats.DisplayStats(syncStatistics, "initial") Catch ex As DbOutdatedSyncException Console.WriteLine("Outdated Knowledge: " & ex.OutdatedPeerSyncKnowledge.ToString() _ & " Clean up knowledge: " + ex.MissingCleanupKnowledge.ToString()) Catch ex As Exception Console.WriteLine(ex.Message) End Try
Show:
