public final class RealmConfiguration extends Object
Instances of a RealmConfiguration can only created by using the RealmConfiguration.Builder
and calling
its RealmConfiguration.Builder.build()
method.
A commonly used RealmConfiguration can easily be accessed by first saving it as
Realm.setDefaultConfiguration(RealmConfiguration)
and then using Realm.getDefaultInstance()
.
A minimal configuration can be created using:
RealmConfiguration config = new RealmConfiguration.Builder(getContext()).build())
This will create a RealmConfiguration with the following properties.
Modifier and Type | Class and Description |
---|---|
static class |
RealmConfiguration.Builder
RealmConfiguration.Builder used to construct instances of a RealmConfiguration in a fluent manner.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_REALM_NAME |
static int |
KEY_LENGTH |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
SharedGroup.Durability |
getDurability() |
byte[] |
getEncryptionKey() |
RealmMigration |
getMigration() |
String |
getPath() |
String |
getRealmFileName() |
File |
getRealmFolder() |
Set<Class<? extends RealmModel>> |
getRealmObjectClasses()
Returns the unmodifiable
Set of model classes that make up the schema for this Realm. |
RxObservableFactory |
getRxFactory()
Returns the
RxObservableFactory that is used to create Rx Observables from Realm objects. |
long |
getSchemaVersion() |
int |
hashCode() |
boolean |
shouldDeleteRealmIfMigrationNeeded() |
String |
toString() |
public static final String DEFAULT_REALM_NAME
public static final int KEY_LENGTH
public File getRealmFolder()
public String getRealmFileName()
public byte[] getEncryptionKey()
public long getSchemaVersion()
public RealmMigration getMigration()
public boolean shouldDeleteRealmIfMigrationNeeded()
public SharedGroup.Durability getDurability()
public Set<Class<? extends RealmModel>> getRealmObjectClasses()
Set
of model classes that make up the schema for this Realm.Set
of model classes.public String getPath()
public RxObservableFactory getRxFactory()
RxObservableFactory
that is used to create Rx Observables from Realm objects.UnsupportedOperationException
- if the required RxJava framework is not on the classpath.