public class DatabaseConfiguration
extends Object


Configuration class for a RoomDatabase.



public final boolean allowDestructiveMigrationOnDowngrade

If true, Room should perform a destructive migration when downgrading without an available migration.

public final boolean allowMainThreadQueries

Whether Room should throw an exception for queries run on the main thread.

public final List<AutoMigrationSpec> autoMigrationSpecs

public final List<RoomDatabase.Callback> callbacks

public final Context context

The context to use while connecting to the database.

public final String copyFromAssetPath

The assets path to a pre-packaged database to copy from.

public final File copyFromFile

The pre-packaged database file to copy from.

public final Callable<InputStream> copyFromInputStream

The callable to get the input stream from which a pre-package database file will be copied from.

public final RoomDatabase.JournalMode journalMode

The journal mode for this database.

public final RoomDatabase.MigrationContainer migrationContainer

Collection of available migrations.

public final boolean multiInstanceInvalidation

If true, table invalidation in an instance of RoomDatabase is broadcast and synchronized with other instances of the same RoomDatabase file, including those in a separate process.

public final String name

The name of the database file or null if it is an in-memory database.

public final RoomDatabase.PrepackagedDatabaseCallback prepackagedDatabaseCallback

public final Executor queryExecutor

The Executor used to execute asynchronous queries.

public final boolean requireMigration

If true, Room should crash if a migration is missing.

public final SupportSQLiteOpenHelper.Factory sqliteOpenHelperFactory

The factory to use to access the database.

public final Executor transactionExecutor

The Executor used to execute asynchronous transactions.

public final List<Object> typeConverters

Public methods