Class SyncConfigurationBase
A SyncConfigurationBase is used to setup a Realm that can be synchronized between devices using Atlas Device Sync. There are two synchronization modes with their respective configurations - "partition" sync with PartitionSyncConfiguration allows you to split your data in separate partitions and synchronize an entire partition with an entire Realm; "flexible" sync with FlexibleSyncConfiguration allows you to start with an empty Realm and send the server a set of queries which it will run and populate the Realm with all documents matching them.
Inheritance
Inherited Members
Namespace: Realms.Sync
Assembly: Realm.dll
Syntax
public abstract class SyncConfigurationBase : RealmConfigurationBase
Properties
| Edit this page View SourceCancelAsyncOperationsOnNonFatalErrors
Gets or sets a value indicating whether async operations, such as GetInstanceAsync(RealmConfigurationBase?, CancellationToken), WaitForUploadAsync(CancellationToken?), or WaitForDownloadAsync(CancellationToken?) should throw an error whenever a non-fatal error, such as timeout occurs.
Declaration
public bool CancelAsyncOperationsOnNonFatalErrors { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Remarks
If set to false
, non-fatal session errors will be ignored and sync will continue retrying the
connection under in the background. This means that in cases where the device is offline, these operations
may take an indeterminate time to complete.
ClientResetHandler
Gets or sets a handler that will be invoked if a client reset error occurs for this Realm. Default is RecoverOrDiscardUnsyncedChangesHandler, that attempts to automatically recover any unsynchronized changes and, if that fails, falls back to the discarding unsynced changes.
Declaration
public virtual ClientResetHandlerBase ClientResetHandler { get; set; }
Property Value
Type | Description |
---|---|
ClientResetHandlerBase | The ClientResetHandlerBase that will be used to handle a client reset. |
Remarks
Supported values are instances of RecoverOrDiscardUnsyncedChangesHandler, RecoverUnsyncedChangesHandler, DiscardUnsyncedChangesHandler and ManualRecoveryHandler. The default RecoverOrDiscardUnsyncedChangesHandler will have no custom actions set for the before and after callbacks.
See Also
| Edit this page View SourceEncryptionKey
Gets or sets the key, used to encrypt the entire Realm. Once set, must be specified each time the file is used.
Declaration
public byte[]? EncryptionKey { get; set; }
Property Value
Type | Description |
---|---|
byte[] | Full 64byte (512bit) key for AES-256 encryption. |
OnSessionError
Gets or sets a callback that will be invoked whenever a SessionException occurs for the synchronized Realm.
Declaration
public SyncConfigurationBase.SessionErrorCallback? OnSessionError { get; set; }
Property Value
Type | Description |
---|---|
SyncConfigurationBase.SessionErrorCallback | The SyncConfigurationBase.SessionErrorCallback that will be used to report transient session errors. |
Remarks
Client reset errors will not be reported through this callback as they are handled by the set ClientResetHandler.
User
Gets the User used to create this SyncConfigurationBase.
Declaration
public User User { get; }
Property Value
Type | Description |
---|---|
User |