Builder
Used to create a SyncConfiguration. For common use cases, a SyncConfiguration can be created using the SyncConfiguration.create function.
Constructors
Functions
build
Link copied to clipboard
error Handler
Link copied to clipboard
fun errorHandler(errorHandler: SyncSession.ErrorHandler): SyncConfiguration.Builder
Content copied to clipboard
Sets the error handler used by Synced Realms when reporting errors with their session.
initial Subscriptions
Link copied to clipboard
fun initialSubscriptions(rerunOnOpen: Boolean = false, initialSubscriptionBlock: InitialSubscriptionsCallback): SyncConfiguration.Builder
Content copied to clipboard
Define the initial io.realm.mongodb.sync.SubscriptionSet for the Realm. This will only be executed the first time the Realm file is opened (and the file created).
log
Link copied to clipboard
open fun log(level: <ERROR CLASS> , customLoggers: List<<ERROR CLASS> >): SyncConfiguration.Builder
Content copied to clipboard
name
Link copied to clipboard
Sets the filename of the realm file.
sync Client Reset Strategy
Link copied to clipboard
fun syncClientResetStrategy(resetStrategy: SyncClientResetStrategy): SyncConfiguration.Builder
Content copied to clipboard
Sets the strategy that would handle the client reset by this synced Realm.
wait For Initial Remote Data
Link copied to clipboard
fun waitForInitialRemoteData(timeout: Duration = Duration.INFINITE): SyncConfiguration.Builder
Content copied to clipboard
Setting this will cause the Realm to download all known changes from the server the first time a Realm is opened. The Realm will not open until all the data has been downloaded. This means that if a device is offline the Realm will not open.