The Java Embedded Database Class Parameters

Parameters provides runtime options for the database open method.

For an overview see page Java Database Class

Class Definition

    public static class Parameters
    {
        public int         memPageSize;
        public int         diskPageSize;
        public int         maxConnections;
        public int         connectionContextSize;
        public long        maxDiskDatabaseSize;
        public long        diskFileExtensionQuantum;
        public long        redoLogLimit;
        public long        delayedCommitThreshold;
        public int         maxDelayedTransactions;
        public CommitPolicy defaultCommitPolicy;
        public LogType     logType;
        public int         hashLoadFactor;
        public int         indexOptimisticLockThreshold;
        public int         mode;
        public String      databaseSnapshotFilePath;
        public String      stringEncoding;
        public Class[]     classes;
        public boolean     diskClassesByDefault;
        public boolean     compactClassesByDefault;
        public boolean     nonatomicClassesByDefault;
        public boolean     dictionaryNoSort;
        public int         maxClasses;
        public int         maxIndexes;
        public int         maxDictionarySize;
        public ClusterParams clusterParams;
        public String      license_key;
        public TransSchedPolicy schedPolicy;
        public long        sqlWorkspaceLimit;
        public int         compressionLevel;
        public int         compressionMask;
        public int         expectedCompressionRatio;
        public String      cipherKey;
        public long        backupMapSize;
        public int         backupMinPages;
        public int         backupMaxPasses;
        public String      backupMapFile;
        public int         fileBackupDelay;

        public Parameters()
        {
            memPageSize = 256;
            diskPageSize = 4096;
            maxConnections = 100;
            connectionContextSize = 0;
            maxDiskDatabaseSize = 0;
            diskFileExtensionQuantum = 0;
            redoLogLimit = 16*1024*1024;
            delayedCommitThreshold = 0;
            maxDelayedTransactions = 0;
            defaultCommitPolicy = CommitPolicy.SyncFlush;
            logType = LogType.RedoLog;
            hashLoadFactor = 100;
            indexOptimisticLockThreshold = 100;
            stringEncoding = "UTF-8";
            schedPolicy = TransSchedPolicy.Fifo;
            sqlWorkspaceLimit = 0;
            compressionLevel = -1;
            compressionMask = Compression_All;
            expectedCompressionRatio = 10;
            backupMaxPasses = 10;
            backupMinPages  = 0;
            backupMapSize   = 0;
            backupMapFile   = null;
        }
    };

Definitions:

memPageSize
The memory page size (default: 256). Note that when using a disk database, this should be a power of two and at least 8 times smaller than the disk page size.
diskPageSize
The persistent storage ("disk") page size (default: 0). Typically 4096 bytes; zero for all-in-memory databases.
maxConnections
The maximum number of database connections (default: 100).
connectionContextSize
The recovery connection context (default: 0 - no recovery connection context).
maxDiskDatabaseSize
The maximum size for a disk database (default: 0 - unlimited).
diskFileExtensionQuantum
The quantum for increasing the size of a persistent database file (can help to reduce file fragmentation).
redoLogLimit
The REDO transaction log threshold. After reaching this threshold, a checkpoint is performed and the log is truncated. Note that the checkpoint can be performed only after a transaction commit, so the size of the log file can become larger than the specified limit. A zero value means to use the implementation-specific default value.
delayedCommitThreshold
The maximum size of uncommitted changes (delayed transaction commits) when using the CommitPolicy.Delayed policy (default: 0 - 1/3 of the available disk cache).
maxDelayedTransactions
The maximum number of delayed transaction commits when using the CommitPolicy.Delayed policy (default: 0 - unlimited).
defaultCommitPolicy
The default commit policy for new connections (default: CommitPolicy.SyncFlush).
logType
The transaction log type (default: LogType.RedoLog).
hashLoadFactor
The hash table load factor (default: 100%). This is a criterion for hash table extension.
indexOptimisticLockThreshold
The maximum number of active write transactions when using optimistic locking of B-Tree indexes (default: 0 - unlimited).
mode
A combination of DB_MODE_* bits (default: 0).
databaseSnapshotFilePath
The path to the file from which a database snapshot will be loaded at open time (default: null - no snapshot to load).
stringEncoding
The default string encoding (string encoding can be specified using the Encoding annotation for each field separately) (default: UTF-8).
classes
The classes to be stored in the database. Only instances of the classes listed can be stored in the database. This parameter has no default value and must be explicitly specified by the application.
diskClassesByDefault
Indicates whether the classes specified in classes will be stored on disk. Disk classes may also be marked explicitly using the disk() attribute of the Persistent annotation.
compactClassesByDefault
Indicates whether the classes specified in classes will be implicitly marked as compact. Compact classes may also be marked explicitly using the compact() attribute of the Persistent annotation.
nonatomicClassesByDefault
Indicates whether the classes specified in classes will be implicitly marked as nonatomic. Also, nonatomic classes may be marked explicitly using the compact() attribute of the Persistent annotation.
dictionaryNoSort
Makes the dictionary compatible with the mcocomp utility called with the -nosort option.
maxClasses
The maximum number of classes in the database (this is needed to support dynamic table creation).
maxIndexes
The maximum number of indexes in the database (this is needed to support dynamic table creation).
maxDictionarySize
The maximum size of the database dictionary (this is needed to support dynamic table creation).
clusterParams
Cluster configuration parameters.
license_key
The eXtremeDB license key (if required).
schedPolicy
The scheduling policy for transactions with the same priority.
sqlWorkspaceLimit
The SQL workspace quota. The default is 0 - unlimited.
compressionLevel
The compression level: 0..9, 0 - no compression, -1: default compression level.
compressionMask
A bitmap of page kinds that should be compressed.
expectedCompressionRatio
Used to allocate the compression page map (note that the virtual database space cannot be larger than the physical size compression ratio).
cipherKey
The database encryption key.
backupMapSize
The size of the backup counters array (in bytes, should be a power of two); ignored if maxDiskDatabaseSize is set. The default is 0 - disable the backup feature.
backupMinPages
The number of pages for the last exclusive pass of the backup procedure; set to zero to disable the threshold. The default is 0.
backupMaxPasses
The maximum number of passes before the exclusive pass of the backup procedure. The default is 10.
backupMapFile
The name of a file that will be used to store temporary backup data on the database close() call.
fileBackupDelay
The delay in milliseconds between writing file backup blocks to minimize backup impact on performance.