Package io.realm.kotlin.mongodb.sync

Types

AutomaticClientResetStrategy
Link copied to clipboard
interface AutomaticClientResetStrategy : SyncClientResetStrategy

Interface that defines an automatic sync client reset strategy, it could be either DiscardUnsyncedChangesStrategy, RecoverOrDiscardUnsyncedChangesStrategy or RecoverUnsyncedChangesStrategy.

BaseSubscriptionSet
Link copied to clipboard
interface BaseSubscriptionSet : Iterable<Subscription>

Base interface for shared functionality between SubscriptionSet and MutableSubscriptionSet.

ConnectionState
Link copied to clipboard
enum ConnectionState : Enum<ConnectionState>

A connection state indicates the state of the underlying connection of the SyncSession.

ConnectionStateChange
Link copied to clipboard
data class ConnectionStateChange(oldState: ConnectionState, newState: ConnectionState)

A connection state change indicates a change in the SyncSession's underlying connection state.

Direction
Link copied to clipboard
enum Direction : Enum<Direction>

A direction indicates whether a given Progress-flow created with SyncSession.progressAsFlow is reporting changes when either uploading or downloading data.

DiscardUnsyncedChangesStrategy
Link copied to clipboard
interface DiscardUnsyncedChangesStrategy : AutomaticClientResetStrategy

Strategy that automatically resolves a Client Reset by discarding any unsynced local data but otherwise keeps the realm open. Any changes will be reported through the normal collection and object notifications.

InitialRemoteDataConfiguration
Link copied to clipboard
data class InitialRemoteDataConfiguration(timeout: Duration)

Configuration options if SyncConfiguration.Builder.waitForInitialRemoteData is enabled.

InitialSubscriptionsCallback
Link copied to clipboard
fun interface InitialSubscriptionsCallback

Callback used to populate the initial SubscriptionSet when opening a Realm.

InitialSubscriptionsConfiguration
Link copied to clipboard
data class InitialSubscriptionsConfiguration(callback: InitialSubscriptionsCallback, rerunOnOpen: Boolean)

Configuration options if SyncConfiguration.Builder.initialSubscriptions is enabled.

ManuallyRecoverUnsyncedChangesStrategy
Link copied to clipboard

Strategy to manually resolve a Client Reset.

MutableSubscriptionSet
Link copied to clipboard
interface MutableSubscriptionSet : BaseSubscriptionSet

A mutable subscription set makes it possible to add, remove or modify a SubscriptionSet. It becomes available when calling SubscriptionSet.update.

Progress
Link copied to clipboard
data class Progress(transferredBytes: ULong, transferableBytes: ULong)

A progress indicator emitted by flows created from SyncSession.progressAsFlow.

ProgressMode
Link copied to clipboard
enum ProgressMode : Enum<ProgressMode>

A progress mode is used to select which notifications are received from SyncSession.progressAsFlow.

RecoverOrDiscardUnsyncedChangesStrategy
Link copied to clipboard

Strategy that attempts to automatically recover any unsynced changes during a Client Reset, if the recovery fails the changes would be discarded.

RecoverUnsyncedChangesStrategy
Link copied to clipboard
interface RecoverUnsyncedChangesStrategy : AutomaticClientResetStrategy

Strategy that attempts to automatically recover any unsynced changes during a Client Reset.

Subscription
Link copied to clipboard
interface Subscription

A subscription defines a specific server query and its metadata. The result of this query is continuously being synchronized with the device as long as the subscription is part of a SubscriptionSet with a state of SubscriptionSetState.COMPLETE.

SubscriptionSet
Link copied to clipboard
interface SubscriptionSet<T> : BaseSubscriptionSet

A subscription set is an immutable view of all current Subscriptions for a given Realm that has been configured for Flexible Sync.

SubscriptionSetState
Link copied to clipboard
enum SubscriptionSetState : Enum<SubscriptionSetState>

The possible states a SubscriptionSet or MutableSubscriptionSet can be in.

SyncClientResetStrategy
Link copied to clipboard
interface SyncClientResetStrategy

Interface that defines a generic sync client reset strategy. It can be either ManuallyRecoverUnsyncedChangesStrategy or DiscardUnsyncedChangesStrategy.

SyncConfiguration
Link copied to clipboard
interface SyncConfiguration

A SyncConfiguration is used to setup a Realm Database that can be synchronized between devices using Atlas Device Sync.

SyncMode
Link copied to clipboard
enum SyncMode : Enum<SyncMode>

This enum determines how Realm sync data with the server.

SyncSession
Link copied to clipboard
interface SyncSession

A session controls how data is synchronized between a single Realm on the device and MongoDB on the server.

WaitForSync
Link copied to clipboard
enum WaitForSync : Enum<WaitForSync>

Enum defining the behaviour of when RealmQuery.subscribe and RealmResults.subscribe will return a query result.

Functions

asQuery
Link copied to clipboard
inline fun <T> Subscription.asQuery(): <ERROR CLASS><T>

Converts the Subscription.queryDescription back to a RealmQuery that can be executed against the local Realm.