SharedBuilder
This class contains shared properties across the two types of configuration builders. Abstracting this allows for minimal rewiring by the compiler plugin since build is available to both builders.
The property functions in this builder return the type of the builder itself, represented by S. This is due to library-base
not having visibility over library-sync
and therefore all function return types have to be typecast as S.
Parameters
the type of RealmConfiguration the builder should generate
the type of builder, needed to distinguish between local and sync variants.
Constructors
Functions
Setting this will change the behavior of how migration exceptions are handled. Instead of throwing an exception the on-disc Realm will be cleared and recreated with the new Realm schema.
Sets the 64 byte key used to encrypt and decrypt the Realm file. If no key is provided the Realm file will be unencrypted.
Sets the maximum number of live versions in the Realm file before an IllegalStateException is thrown when attempting to write more data.
Sets the classes of the schema.
Sets the schema version of the Realm. This must be equal to or higher than the schema version of the existing Realm file, if any. If the schema version is higher than the already existing Realm, a migration is needed.