SDatabaseConfig (Oracle - Berkeley DB Client-Server API)
Date: 2018-05-29

com.sleepycat.client

## Class SDatabaseConfig

- java.lang.Object
- - com.sleepycat.client.SDatabaseConfig

- Direct Known Subclasses:
    SSecondaryConfig

      public class SDatabaseConfig
      extends java.lang.Object

  Specify the attributes of a database.

  For a user created instance, no attribute is set by default. In addition, calling the getter method of an unset attribute results in an IllegalStateException. To set an attribute, call the setter method of the attribute.

  When used to create a database, system default values are used for unset attributes. When used to modify the configuration of an existing database, only set attributes are modified; unset attributes are not modified.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SDatabaseConfig()` Create an empty SDatabaseConfig with no attribute set.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SDatabaseConfig` | `cloneConfig()` Create a deep copy of this configuration object.
    `boolean` | `getAllowCreate()` Return true if the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method is configured to create the database if it does not already exist.
    `int` | `getBlobThreshold()` Return the threshold value in bytes beyond which data items are stored as blobs.
    `java.util.Comparator<byte[]>` | `getBtreeComparator()` Always return null.
    `int` | `getBtreeMinKey()` Return the minimum number of key/data pairs intended to be stored on any single Btree leaf page.
    `boolean` | `getBtreeRecordNumbers()` Return true if the Btree is configured to support retrieval by record number.
    `boolean` | `getChecksum()` Return true if the database environment is configured to do checksum verification of pages read into the cache from the backing filestore.
    `boolean` | `getExclusiveCreate()` Return true if the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method is configured to fail if the database already exists.
    `protected java.lang.Object` | `getField(F field)` Return the value set on a specified field.
    `int` | `getHashFillFactor()` Return the hash table density.
    `int` | `getHashNumElements()` Return the estimate of the final size of the hash table.
    `int` | `getHeapRegionSize()` Return the number of pages in a region of the database.
    `long` | `getHeapsize()` Return the maximum on-disk database file size.
    `boolean` | `getMultiversion()` Return true if the database is configured for multiversion concurrency control.
    `java.lang.Boolean` | `getNoWaitDbExclusiveLock()` Return whether the `SDatabase` handle is configured to obtain a write lock on the entire database.
    `int` | `getPageSize()` Return the size of the pages used to hold items in the database, in bytes.
    `SCacheFilePriority` | `getPriority()` Return the cache priority for pages referenced by this handle.
    `int` | `getQueueExtentSize()` Return the size of the extents used to hold pages in a Queue database, specified as a number of pages.
    `boolean` | `getReadOnly()` Return true if the database is configured in read-only mode.
    `boolean` | `getReadUncommitted()` Return true if the database is configured to support read uncommitted.
    `int` | `getRecordLength()` Return the database record length, in bytes.
    `int` | `getRecordPad()` Return the padding character for short, fixed-length records for the Queue and Recno access methods.
    `boolean` | `getRenumbering()` Return true if the logical record numbers are mutable, and change as records are added to and deleted from the database.
    `boolean` | `getReverseSplitOff()` Return true if the Btree has been configured to not do reverse splits.
    `boolean` | `getSortedDuplicates()` Return true if the database is configured to support sorted duplicate data items.
    `protected T` | `getThriftObj()`
    `boolean` | `getTransactional()` Always return true.
    `boolean` | `getTransactionNotDurable()` Return true if the database environment is configured to not write log records for this database.
    `SDatabaseType` | `getType()` Return the type of the database.
    `boolean` | `getUnsortedDuplicates()` Return true if the database is configured to support duplicate data items.
    `SDatabaseConfig` | `setAllowCreate(boolean allowCreate)` Configure the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method to create the database if it does not already exist.
    `SDatabaseConfig` | `setBlobThreshold(int value)` Set the size in bytes which is used to determine when a data item will be stored as a blob.
    `SDatabaseConfig` | `setBtreeMinKey(int btMinKey)` Set the minimum number of key/data pairs intended to be stored on any single Btree leaf page.
    `SDatabaseConfig` | `setBtreeRecordNumbers(boolean btreeRecordNumbers)` Configure the Btree to support retrieval by record number.
    `SDatabaseConfig` | `setChecksum(boolean checksum)` Configure the database environment to do checksum verification of pages read into the cache from the backing filestore.
    `SDatabaseConfig` | `setExclusiveCreate(boolean exclusiveCreate)` Configure the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method to fail if the database already exists.
    `SDatabaseConfig` | `setHashFillFactor(int hashFillFactor)` Set the desired density within the hash table.
    `SDatabaseConfig` | `setHashNumElements(int hashNumElements)` Set an estimate of the final size of the hash table.
    `SDatabaseConfig` | `setHeapRegionSize(int npages)` Sets the number of pages in a region of a database configured to use the Heap access method.
    `SDatabaseConfig` | `setHeapsize(long bytes)` Set the maximum on-disk database file size used by a database configured to use the Heap access method.
    `SDatabaseConfig` | `setMultiversion(boolean multiversion)` Configured the database with support for multiversion concurrency control.
    `SDatabaseConfig` | `setNoWaitDbExclusiveLock(java.lang.Boolean noWaitDbExclLock)` Configure the `SDatabase` handle to obtain a write lock on the entire database.
    `SDatabaseConfig` | `setPageSize(int pageSize)` Set the size of the pages used to hold items in the database, in bytes.
    `SDatabaseConfig` | `setPriority(SCacheFilePriority priority)` Set the cache priority for pages referenced by the DB handle.
    `SDatabaseConfig` | `setQueueExtentSize(int queueExtentSize)` Set the size of the extents used to hold pages in a Queue database, specified as a number of pages.
    `SDatabaseConfig` | `setReadOnly(boolean readOnly)` Configure the database in read-only mode.
    `SDatabaseConfig` | `setReadUncommitted(boolean readUncommitted)` Configure the database to support read uncommitted.
    `SDatabaseConfig` | `setRecordLength(int recordLength)` Specify the database record length, in bytes.
    `SDatabaseConfig` | `setRecordPad(int recordPad)` Set the padding character for short, fixed-length records for the Queue and Recno access methods.
    `SDatabaseConfig` | `setRenumbering(boolean renumbering)` Configure the logical record numbers to be mutable, and change as records are added to and deleted from the database.
    `SDatabaseConfig` | `setReverseSplitOff(boolean reverseSplitOff)` Configure the Btree to not do reverse splits.
    `SDatabaseConfig` | `setSortedDuplicates(boolean sortedDuplicates)` Configure the database to support sorted, duplicate data items.
    `SDatabaseConfig` | `setTransactionNotDurable(boolean transactionNotDurable)` Configure the database environment to not write log records for this database.
    `SDatabaseConfig` | `setType(SDatabaseType type)` Configure the type of the database.
    `SDatabaseConfig` | `setUnsortedDuplicates(boolean unsortedDuplicates)` Configure the database to support unsorted duplicate data items.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SDatabaseConfig

          public SDatabaseConfig()

      Create an empty SDatabaseConfig with no attribute set.

  - ### Method Detail

    - #### cloneConfig

          public SDatabaseConfig cloneConfig()

      Create a deep copy of this configuration object.
      Returns:
        a deep copy of this configuration object

    - #### getAllowCreate

          public boolean getAllowCreate()

      Return true if the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method is configured to create the database if it does not already exist.

      Returns:
        true if the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method is configured to create the database if it does not already exist

    - #### setAllowCreate

          public SDatabaseConfig setAllowCreate(boolean allowCreate)

      Configure the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method to create the database if it does not already exist.
      Parameters:
        `allowCreate` - if true, configure the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method to create the database if it does not already exist.
      Returns:
        this

    - #### getBlobThreshold

          public int getBlobThreshold()

      Return the threshold value in bytes beyond which data items are stored as blobs.
      Returns:
        the threshold value in bytes beyond which data items are stored as blobs; if 0, blob is not used by the database

    - #### setBlobThreshold

          public SDatabaseConfig setBlobThreshold(int value)

      Set the size in bytes which is used to determine when a data item will be stored as a blob.

      Any data item that is equal to or larger in size than the threshold value will automatically be stored as a blob.

      It is illegal to enable blob in the database which is configured with chksum, encryption, duplicates, sorted duplicates, compression, multiversion concurrency control and transactional read operations with degree 1 isolation.

      This threshold value can not be set after opening the database.

      Parameters:
        `value` - The size in bytes which is used to determine when a data item will be stored as a blob; if 0, blob will be never used by the database.
      Returns:
        this

    - #### getBtreeComparator

          public java.util.Comparator<byte[]> getBtreeComparator()

      Always return null. For compatibility with DPL APIs.
      Returns:
        always null

    - #### getBtreeMinKey

          public int getBtreeMinKey()

      Return the minimum number of key/data pairs intended to be stored on any single Btree leaf page.

      Returns:
        the minimum number of key/data pairs intended to be stored on any single Btree leaf page

    - #### setBtreeMinKey

          public SDatabaseConfig setBtreeMinKey(int btMinKey)

      Set the minimum number of key/data pairs intended to be stored on any single Btree leaf page.

      This value is used to determine if key or data items will be stored on overflow pages instead of Btree leaf pages. The value must be at least 2; if the value is not explicitly set, a value of 2 is used.

      This method configures a database, not only operations performed using the specified handle.

      This attribute cannot be changed after the database is created. If opening an existing database, this attribute is ignored.

      Parameters:
        `btMinKey` - The minimum number of key/data pairs intended to be stored on any single Btree leaf page.
      Returns:
        this

    - #### getBtreeRecordNumbers

          public boolean getBtreeRecordNumbers()

      Return true if the Btree is configured to support retrieval by record number.
      Returns:
        true if the Btree is configured to support retrieval by record number

    - #### setBtreeRecordNumbers

          public SDatabaseConfig setBtreeRecordNumbers(boolean btreeRecordNumbers)

      Configure the Btree to support retrieval by record number.

      Logical record numbers in Btree databases are mutable in the face of record insertion or deletion.

      Maintaining record counts within a Btree introduces a serious point of contention, namely the page locations where the record counts are stored. In addition, the entire database must be locked during both insertions and deletions, effectively single-threading the database for those operations. Configuring a Btree for retrieval by record number can result in serious performance degradation for some applications and data sets.

      Retrieval by record number may not be configured for a Btree that also supports duplicate data items.

      This method configures a database, not only operations performed using the specified handle.

      If the database already exists when the database is opened, any database configuration specified by this method must be the same as the existing database or an error will be returned.

      Parameters:
        `btreeRecordNumbers` - if true, configure the Btree to support retrieval by record number.
      Returns:
        this

    - #### getChecksum

          public boolean getChecksum()

      Return true if the database environment is configured to do checksum verification of pages read into the cache from the backing filestore.
      Returns:
        true if the database environment is configured to do checksum verification of pages read into the cache from the backing filestore

    - #### setChecksum

          public SDatabaseConfig setChecksum(boolean checksum)

      Configure the database environment to do checksum verification of pages read into the cache from the backing filestore.

      Berkeley DB uses the SHA1 Secure Hash Algorithm if encryption is also configured for this database, and a general hash algorithm if it is not.

      Calling this method only affects the specified `SDatabase` handle (and any other library handles opened within the scope of that handle).

      If the database already exists when the database is opened, any database configuration specified by this method will be ignored. If creating additional databases in a file, the checksum behavior specified must be consistent with the existing databases in the file or an error will be returned.

      Parameters:
        `checksum` - if true, configure the database environment to do checksum verification of pages read into the cache from the backing filestore
      Returns:
        this

    - #### getExclusiveCreate

          public boolean getExclusiveCreate()

      Return true if the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method is configured to fail if the database already exists.
      Returns:
        true if the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method is configured to fail if the database already exists

    - #### setExclusiveCreate

          public SDatabaseConfig setExclusiveCreate(boolean exclusiveCreate)

      Configure the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method to fail if the database already exists.

      The exclusiveCreate mode is only meaningful if specified with the allowCreate mode.

      Parameters:
        `exclusiveCreate` - if true, configure the `SEnvironment.openDatabase(com.sleepycat.client.STransaction, java.lang.String, java.lang.String, com.sleepycat.client.SDatabaseConfig)` method to fail if the database already exists
      Returns:
        this

    - #### getHashFillFactor

          public int getHashFillFactor()

      Return the hash table density.
      Returns:
        the hash table density.

    - #### setHashFillFactor

          public SDatabaseConfig setHashFillFactor(int hashFillFactor)

      Set the desired density within the hash table.

      If no value is specified, the fill factor will be selected dynamically as pages are filled.

      The density is an approximation of the number of keys allowed to accumulate in any one bucket, determining when the hash table grows or shrinks. If you know the average sizes of the keys and data in your data set, setting the fill factor can enhance performance. A reasonable rule computing fill factor is to set it to the following:

            (pagesize - 32) / (average_key_size + average_data_size + 8)

      This method configures a database, not only operations performed using the specified handle.

      This attribute cannot be changed after the database is created. If opening an existing database, this attribute is ignored.

      Parameters:
        `hashFillFactor` - the desired density within the hash table
      Returns:
        this

    - #### getHashNumElements

          public int getHashNumElements()

      Return the estimate of the final size of the hash table.
      Returns:
        the estimate of the final size of the hash table

    - #### setHashNumElements

          public SDatabaseConfig setHashNumElements(int hashNumElements)

      Set an estimate of the final size of the hash table.

      In order for the estimate to be used when creating the database, the `setHashFillFactor(int)` method must also be called. If the estimate or fill factor are not set or are set too low, hash tables will still expand gracefully as keys are entered, although a slight performance degradation may be noticed.

      This method configures a database, not only operations performed using the specified handle.

      This attribute cannot be changed after the database is created. If opening an existing database, this attribute is ignored.

      Parameters:
        `hashNumElements` - an estimate of the final size of the hash table.
      Returns:
        this

    - #### getHeapsize

          public long getHeapsize()

      Return the maximum on-disk database file size.
      Returns:
        the maximum on-disk database file size

    - #### setHeapsize

          public SDatabaseConfig setHeapsize(long bytes)

      Set the maximum on-disk database file size used by a database configured to use the Heap access method. If this method is never called, the database's file size can grow without bound. If this method is called, then the heap file can never grow larger than the limit defined by this method. In that case, attempts to update or create records in a Heap database that has reached its maximum size will throw a `SHeapFullException`.

      The size specified to this method must be at least three times the database page size. That is, a Heap database must contain at least three database pages. You can set the database page size using `setPageSize(int)`.

      This method may not be called after the database is opened. Further, if this method is called on an existing Heap database, the size specified here must match the size used to create the database. Note, however, that specifying an incorrect size to this method will not result in an error return until the database is opened.

      Parameters:
        `bytes` - the maximum on-disk database file size
      Returns:
        this

    - #### getHeapRegionSize

          public int getHeapRegionSize()

      Return the number of pages in a region of the database.
      Returns:
        the size of the region, in pages

    - #### setHeapRegionSize

          public SDatabaseConfig setHeapRegionSize(int npages)

      Sets the number of pages in a region of a database configured to use the Heap access method. If this method is never called, the default region size for the database's page size will be used. You can set the database page size using `setPageSize(int)`.

      This method may not be called after the database is opened. Further, if this method is called on an existing Heap database, the value specified here will be ignored. If the specified region size is larger than the maximum region size for the database's page size, an error will be returned when the database is opened. The maximum allowable region size will be included in the error message.

      Parameters:
        `npages` - The size of the region, in pages.
      Returns:
        this

    - #### getMultiversion

          public boolean getMultiversion()

      Return true if the database is configured for multiversion concurrency control.
      Returns:
        true if the database is configured for multiversion concurrency control

    - #### setMultiversion

          public SDatabaseConfig setMultiversion(boolean multiversion)

      Configured the database with support for multiversion concurrency control. This will cause updates to the database to follow a copy-on-write protocol, which is required to support Snapshot Isolation. See `STransactionConfig.setSnapshot(boolean)`) for more information. Multiversion access is not supported for queue databases.
      Parameters:
        `multiversion` - if true, configure the database with support for multiversion concurrency control.
      Returns:
        this

    - #### getNoWaitDbExclusiveLock

          public java.lang.Boolean getNoWaitDbExclusiveLock()

      Return whether the `SDatabase` handle is configured to obtain a write lock on the entire database.
      Returns:
        True if the `SDatabase` handle is configured for immediate exclusive database locking. In this case, the locking operation will error out if it cannot immediately obtain an exclusive lock. False if the `SDatabase` handle is configured for exclusive database locking. In this case, it will block until it can obtain the exclusive database lock when database is opened. Null if the `SDatabase` handle is not configured for exclusive locking.

    - #### setNoWaitDbExclusiveLock

          public SDatabaseConfig setNoWaitDbExclusiveLock(java.lang.Boolean noWaitDbExclLock)

      Configure the `SDatabase` handle to obtain a write lock on the entire database.

      Handles configured for a write lock on the entire database can only have one active transaction at a time.

      Parameters:
        `noWaitDbExclLock` - If True, configure the `SDatabase` handle to obtain a write lock on the entire database. When the database is opened it will immediately throw `SLockNotGrantedException` if it cannot obtain the exclusive lock immediately. If False, configure the `SDatabase` handle to obtain a write lock on the entire database. When the database is opened, it will block until it can obtain the exclusive lock. If null, do not configure the `SDatabase` handle to obtain a write lock on the entire database.
      Returns:
        this

    - #### getPageSize

          public int getPageSize()

      Return the size of the pages used to hold items in the database, in bytes.
      Returns:
        the size of the pages used to hold items in the database, in bytes.

    - #### setPageSize

          public SDatabaseConfig setPageSize(int pageSize)

      Set the size of the pages used to hold items in the database, in bytes.

      The minimum page size is 512 bytes, the maximum page size is 64K bytes, and the page size must be a power-of-two. If the page size is not explicitly set, one is selected based on the underlying filesystem I/O block size. The automatically selected size has a lower limit of 512 bytes and an upper limit of 16K bytes.

      This method configures a database, not only operations performed using the specified handle.

      This method may not be called after the database is opened. If the database already exists when it is opened, the information specified to this method will be ignored. If creating additional databases in a file, the page size specified must be consistent with the existing databases in the file or an error will be returned.

      Parameters:
        `pageSize` - the size of the pages used to hold items in the database, in bytes.
      Returns:
        this

    - #### getPriority

          public SCacheFilePriority getPriority()

      Return the cache priority for pages referenced by this handle.
      Returns:
        the cache priority for pages referenced by this handle.

    - #### setPriority

          public SDatabaseConfig setPriority(SCacheFilePriority priority)

      Set the cache priority for pages referenced by the DB handle.

      The priority of a page biases the replacement algorithm to be more or less likely to discard a page when space is needed in the buffer pool. The bias is temporary, and pages will eventually be discarded if they are not referenced again. The priority setting is only advisory, and does not guarantee pages will be treated in a specific way.

      Parameters:
        `priority` - the desired cache priority.
      Returns:
        this

    - #### getQueueExtentSize

          public int getQueueExtentSize()

      Return the size of the extents used to hold pages in a Queue database, specified as a number of pages.
      Returns:
        the size of the extents used to hold pages in a Queue database, specified as a number of pages.

    - #### setQueueExtentSize

          public SDatabaseConfig setQueueExtentSize(int queueExtentSize)

      Set the size of the extents used to hold pages in a Queue database, specified as a number of pages.

      Each extent is created as a separate physical file. If no extent size is set, the default behavior is to create only a single underlying database file.

      This method configures a database, not only operations performed using the specified handle.

      This method may not be called after the database is opened. If the database already exists when it is opened, the information specified to this method will be ignored.

      Parameters:
        `queueExtentSize` - The number of pages in a Queue database extent.
      Returns:
        this

    - #### getReadOnly

          public boolean getReadOnly()

      Return true if the database is configured in read-only mode.
      Returns:
        true if the database is configured in read-only mode

    - #### setReadOnly

          public SDatabaseConfig setReadOnly(boolean readOnly)

      Configure the database in read-only mode.

      Any attempt to modify items in the database will fail, regardless of the actual permissions of any underlying files.

      Parameters:
        `readOnly` - if true, configure the database in read-only mode.
      Returns:
        this

    - #### getReadUncommitted

          public boolean getReadUncommitted()

      Return true if the database is configured to support read uncommitted.
      Returns:
        true if the database is configured to support read uncommitted.

    - #### setReadUncommitted

          public SDatabaseConfig setReadUncommitted(boolean readUncommitted)

      Configure the database to support read uncommitted.

      Read operations on the database may request the return of modified but not yet committed data. This flag must be specified on all `SDatabase` handles used to perform read uncommitted or database updates, otherwise requests for read uncommitted may not be honored and the read may block.

      Parameters:
        `readUncommitted` - if true, configure the database to support read uncommitted.
      Returns:
        this

    - #### getRecordLength

          public int getRecordLength()

      Return the database record length, in bytes.
      Returns:
        the database record length, in bytes.

    - #### setRecordLength

          public SDatabaseConfig setRecordLength(int recordLength)

      Specify the database record length, in bytes.

      For the Queue access method, specify the record length. For the Queue access method, the record length must be enough smaller than the database's page size that at least one record plus the database page's metadata information can fit on each database page.

      For the Recno access method, specify the records are fixed-length, not byte-delimited, and are of length `recordLength`.

      Any records added to the database that are less than the specified length are automatically padded (see `setRecordPad(int)` for more information).

      Any attempt to insert records into the database that are greater than the specified length will cause the call to fail.

      This method configures a database, not only operations performed using the specified handle.

      This method may not be called after the database is opened. If the database already exists when it is opened, the information specified to this method will be ignored.

      Parameters:
        `recordLength` - the database record length, in bytes.
      Returns:
        this

    - #### getRecordPad

          public int getRecordPad()

      Return the padding character for short, fixed-length records for the Queue and Recno access methods.
      Returns:
        the padding character for short, fixed-length records for the Queue and Recno access methods.

    - #### setRecordPad

          public SDatabaseConfig setRecordPad(int recordPad)

      Set the padding character for short, fixed-length records for the Queue and Recno access methods.

      If no pad character is specified, "space" characters (that is, ASCII 0x20) are used for padding.

      This method configures a database, not only operations performed using the specified handle.

      This method may not be called after the database is opened. If the database already exists when it is opened, the information specified to this method will be ignored.

      Parameters:
        `recordPad` - the padding character for short, fixed-length records for the Queue and Recno access methods.
      Returns:
        this

    - #### getRenumbering

          public boolean getRenumbering()

      Return true if the logical record numbers are mutable, and change as records are added to and deleted from the database.
      Returns:
        true if the logical record numbers are mutable, and change as records are added to and deleted from the database.

    - #### setRenumbering

          public SDatabaseConfig setRenumbering(boolean renumbering)

      Configure the logical record numbers to be mutable, and change as records are added to and deleted from the database.

      For example, the deletion of record number 4 causes records numbered 5 and greater to be renumbered downward by one. If a cursor was positioned to record number 4 before the deletion, it will refer to the new record number 4, if any such record exists, after the deletion. If a cursor was positioned after record number 4 before the deletion, it will be shifted downward one logical record, continuing to refer to the same record as it did before.

      Creating new records will cause the creation of multiple records if the record number is more than one greater than the largest record currently in the database. For example, creating record 28, when record 25 was previously the last record in the database, will create records 26 and 27 as well as 28. Attempts to retrieve records that were created in this manner will result in an error return of `SOperationStatus.KEYEMPTY`.

      If a created record is not at the end of the database, all records following the new record will be automatically renumbered upward by one. For example, the creation of a new record numbered 8 causes records numbered 8 and greater to be renumbered upward by one. If a cursor was positioned to record number 8 or greater before the insertion, it will be shifted upward one logical record, continuing to refer to the same record as it did before.

      For these reasons, concurrent access to a Recno database configured with mutable record numbers may be largely meaningless, although it is supported.

      Calling this method affects the database, including all threads of control accessing the database.

      If the database already exists when the database is opened, any database configuration specified by this method must be the same as the existing database or an error will be returned.

      Parameters:
        `renumbering` - if true, configure the logical record numbers to be mutable, and change as records are added to and deleted from the database.
      Returns:
        this

    - #### getReverseSplitOff

          public boolean getReverseSplitOff()

      Return true if the Btree has been configured to not do reverse splits.
      Returns:
        true if the Btree has been configured to not do reverse splits.

    - #### setReverseSplitOff

          public SDatabaseConfig setReverseSplitOff(boolean reverseSplitOff)

      Configure the Btree to not do reverse splits.

      As pages are emptied in a database, the Btree implementation attempts to coalesce empty pages into higher-level pages in order to keep the database as small as possible and minimize search time. This can hurt performance in applications with cyclical data demands; that is, applications where the database grows and shrinks repeatedly. For example, because Berkeley DB does page-level locking, the maximum level of concurrency in a database of two pages is far smaller than that in a database of 100 pages, so a database that has shrunk to a minimal size can cause severe deadlocking when a new cycle of data insertion begins.

      Calling this method only affects the specified `SDatabase` handle (and any other library handles opened within the scope of that handle).

      Parameters:
        `reverseSplitOff` - if true, configure the Btree to not do reverse splits.
      Returns:
        this

    - #### getSortedDuplicates

          public boolean getSortedDuplicates()

      Return true if the database is configured to support sorted duplicate data items.
      Returns:
        true if the database is configured to support sorted duplicate data items

    - #### setSortedDuplicates

          public SDatabaseConfig setSortedDuplicates(boolean sortedDuplicates)

      Configure the database to support sorted, duplicate data items.

      Insertion when the key of the key/data pair being inserted already exists in the database will be successful. The ordering of

      If a primary database is to be associated with one or more secondary databases, it may not be configured for duplicates.

      A Btree that supports duplicate data items cannot also be configured for retrieval by record number.

      Calling this method affects the database, including all threads of control accessing the database.

      If the database already exists when the database is opened, any database configuration specified by this method must be the same as the existing database or an error will be returned.

      Parameters:
        `sortedDuplicates` - if true, configure the database to support duplicate data items
      Returns:
        this

    - #### getUnsortedDuplicates

          public boolean getUnsortedDuplicates()

      Return true if the database is configured to support duplicate data items.
      Returns:
        true if the database is configured to support duplicate data items

    - #### setUnsortedDuplicates

          public SDatabaseConfig setUnsortedDuplicates(boolean unsortedDuplicates)

      Configure the database to support unsorted duplicate data items.

      Insertion when the key of the key/data pair being inserted already exists in the database will be successful. The ordering of duplicates in the database is determined by the order of insertion, unless the ordering is otherwise specified by use of a database cursor operation.

      If a primary database is to be associated with one or more secondary databases, it may not be configured for duplicates.

      Sorted duplicates are preferred to unsorted duplicates for performance reasons. Unsorted duplicates should only be used by applications wanting to order duplicate data items manually.

      Calling this method affects the database, including all threads of control accessing the database.

      If the database already exists when the database is opened, any database configuration specified by this method must be the same as the existing database or an error will be returned.

      Parameters:
        `unsortedDuplicates` - if true, configure the database to support unsorted duplicate data items
      Returns:
        this

    - #### getTransactional

          public boolean getTransactional()

      Always return true. For compatibility with DPL APIs.
      Returns:
        always true

    - #### getTransactionNotDurable

          public boolean getTransactionNotDurable()

      Return true if the database environment is configured to not write log records for this database.
      Returns:
        true if the database environment is configured to not write log records for this database

    - #### setTransactionNotDurable

          public SDatabaseConfig setTransactionNotDurable(boolean transactionNotDurable)

      Configure the database environment to not write log records for this database.

      This means that updates of this database exhibit the ACI (atomicity, consistency, and isolation) properties, but not D (durability); that is, database integrity will be maintained, but if the server fails, integrity will not persist. The database file must be verified and/or restored from backup after a failure. In order to ensure integrity after server shut down, all database changes must be flushed from the database environment cache using `SEnvironment.checkpoint(com.sleepycat.client.SCheckpointConfig)`.

      All database handles for a single physical file must call this method, including database handles for different databases in a physical file.

      Calling this method only affects the specified `SDatabase` handle (and any other library handles opened within the scope of that handle).

      Parameters:
        `transactionNotDurable` - if true, configure the database environment to not write log records for this database
      Returns:
        this

    - #### getType

          public SDatabaseType getType()

      Return the type of the database.

      This method may be used to determine the type of the database after opening it.

      Returns:
        the type of the database

    - #### setType

          public SDatabaseConfig setType(SDatabaseType type)

      Configure the type of the database.
      Parameters:
        `type` - the type of the database.
      Returns:
        this

    - #### getThriftObj

          protected T getThriftObj()

    - #### getField

          protected java.lang.Object getField(F field)
                                       throws java.lang.IllegalStateException

      Return the value set on a specified field. Throw IllegalStateException if the field is not set.
      Parameters:
        `field` - the field
      Returns:
        the field's value
      Throws:
        `java.lang.IllegalStateException` - if the field is not set

Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved.