Builder

fun Builder(user: User, schema: Set<KClass<out RealmObject>>)

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.

fun Builder(user: User, partitionValue: ObjectId?, schema: Set<KClass<out RealmObject>>)

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 ObjectId 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

fun Builder(user: User, partitionValue: Int?, schema: Set<KClass<out RealmObject>>)

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.

fun Builder(user: User, partitionValue: Long?, schema: Set<KClass<out RealmObject>>)

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.

fun Builder(user: User, partitionValue: String?, schema: Set<KClass<out RealmObject>>)

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.