Builder

constructor(user: User, schema: Set<KClass<out BaseRealmObject>>)

Creates a SyncConfiguration.Builder for Flexible Sync. Flexible Sync must be enabled on the server for this to work.

See: Flexible Sync

Parameters

user

user used to access server side data. This will define which data is available from the server.

schema

the classes of the schema. The elements of the set must be direct class literals.


constructor(user: User, partitionValue: BsonObjectId?, schema: Set<KClass<out BaseRealmObject>>)

Creates a SyncConfiguration.Builder for Partition-Based Sync. Partition-Based Sync must be enabled on the server for this to work.

See: Partitions

Parameters

user

user used to access server side data. This will define which data is available from the server.

partitionValue

the partition value to use data from. The server must have been configured with an BsonObjectId partition key for this to work.

schema

the classes of the schema. The elements of the set must be direct class literals. See: partition key


constructor(user: User, partitionValue: RealmUUID?, schema: Set<KClass<out BaseRealmObject>>)

Creates a SyncConfiguration.Builder for Partition-Based Sync. Partition-Based Sync must be enabled on the server for this to work.

See: Partitions

Parameters

user

user used to access server side data. This will define which data is available from the server.

partitionValue

the partition value to use data from. The server must have been configured with a RealmUUID partition key for this to work.

schema

the classes of the schema. The elements of the set must be direct class literals. See: partition key


constructor(user: User, partitionValue: Int?, schema: Set<KClass<out BaseRealmObject>>)

Creates a SyncConfiguration.Builder for Partition-Based Sync. Partition-Based Sync must be enabled on the server for this to work.

Parameters

user

user used to access server side data. This will define which data is available from the server.

partitionValue

the partition value to use data from. The server must have been configured with a Int partition key for this to work.

schema

the classes of the schema. The elements of the set must be direct class literals.


constructor(user: User, partitionValue: Long?, schema: Set<KClass<out BaseRealmObject>>)

Creates a SyncConfiguration.Builder for Partition-Based Sync. Partition-Based Sync must be enabled on the server for this to work.

See: Partitions

Parameters

user

user used to access server side data. This will define which data is available from the server.

partitionValue

the partition value to use data from. The server must have been configured with a Long partition key for this to work.

schema

the classes of the schema. The elements of the set must be direct class literals.


constructor(user: User, partitionValue: String?, schema: Set<KClass<out BaseRealmObject>>)

Creates a SyncConfiguration.Builder for Partition-Based Sync. Partition-Based Sync must be enabled on the server for this to work.

See: Partitions

Parameters

user

user used to access server side data. This will define which data is available from the server.

partitionValue

the partition value to use data from. The server must have been configured with a String partition key for this to work.

schema

the classes of the schema. The elements of the set must be direct class literals.