SecondaryDatabase
extend those of a primary Database
. The secondary database configuration is specified when calling {@link Environment#openSecondaryDatabase Environment.openSecondaryDatabase}. To create a configuration object with default attributes:
SecondaryConfig config = new SecondaryConfig();To set custom attributes:
SecondaryConfig config = new SecondaryConfig(); config.setAllowCreate(true); config.setSortedDuplicates(true); config.setKeyCreator(new MyKeyCreator());
NOTE: There are two situations where the use of secondary databases without transactions requires special consideration. When using a transactional database or when doing read operations only, this note does not apply.
DatabaseException
will be thrown in this situation.ABORT
(the default setting), a DatabaseException
will be thrown if an attempt is made to delete a referenced foreign key.
@see Environment#openSecondaryDatabase Environment.openSecondaryDatabase @see SecondaryDatabase
|
|
|
|
|
|
|
|
|
|