# The Java Database Constants

The following constant values are defined in the Database class:

### Class Definition

        public class Database implements java.io.Closeable
        {
            ...
            /* Database Compression */
            public static final int Compression_ObjHead     = 0x01;
            public static final int Compression_ObjNode     = 0x02;
            public static final int Compression_BlobHead    = 0x40;
            public static final int Compression_BlobTail    = 0x80;
            public static final int Compression_FixedrecSet = 0x1000;
            public static final int Compression_All         = Compression_ObjHead |
                Compression_ObjNode | Compression_FixedrecSet |
                Compression_BlobHead | Compression_BlobTail;

            /* Database options */
            /**
            * Automatically perform cleanup of a disk database after a crash. (remove all working copies.)
            * (This is appropriate only if using the MVCC transaction manager.)
            */
            public static final int DB_MODE_MVCC_AUTO_REPAIR = 0x01;
            /**
            * Sort objects by key before inserting into disk indexes.
            */
            public static final int DB_MODE_SMART_INDEX_INSERT = 0x2;
            /**
            * Open existing NVRAM database. By default INSTANCE_DUPLICATE is reported if opened database already exists.
            * With this flag it is not an error to have the database already registered.
            */
            public static final int DB_OPEN_EXISTING              = 0x04;
            /**
            * Calculate CRC of disk database pages
            */
            public static final int DB_USE_CRC_CHECK              = 0x08;
            /**
            * Mark class transient (not saved in disk database)
            */
            public static final int DB_TRANSIENT                  = 0x10;
            /**
            * Initialize memory pages on demand
            */
            public static final int DB_LAZY_MEM_INITIALIZATION    = 0x20;
            /**
            * Release MURSIW write lock before flushing changes to the disk
            */
            public static final int DB_MURSIW_DISK_COMMIT_OPTIMIZATION = 0x40;
            /**
            * Write all dirty unpinned pages to the disk at once
            * (instead of writing individual page when it is thrown away from cache)
            */
            public static final int DB_BULK_WRITE_MODIFIED_PAGES = 0x80;
            /**
            * Calculate CRC only for first and last word of transaction body
            */
            public static final int MCO_DB_BTREE_HOLD_LOCKS = 0x0100;
            public static final int DB_INDEX_PRELOAD = 0x0200;
            public static final int DB_DISABLE_NESTED_TRANSACTIONS = 0x0400;
            public static final int DB_DISABLE_IMPLICIT_ROLLBACK = 0x0800;
            public static final int DB_INMEMORY_PROTECTION = 0x1000;
            public static final int DB_INCLUSIVE_BTREE = 0x2000;
            public static final int DB_INMEMORY_COMPRESSION = 0x4000;
            public static final int DB_SEPARATE_BITMAP = 0x8000;
            public static final int DB_DISABLE_BTREE_REBALANCE_ON_DELETE = 0x10000;
            public static final int DB_AUTO_ROLLBACK_FIRST_PHASE = 0x20000;
            public static final int DB_MVCC_COMPATIBILITY_MODE = 0x40000;
            public static final int DB_DISABLE_PAGE_POOL_RESERVE = 0x80000;
            public static final int DB_REDO_LOG_OPTIMIZATION = 0x100000;
            public static final int DB_DISABLE_HOT_UPDATES = 0x200000;
            public static final int DB_SQL_AUTOCHECKPOINT = 0x400000;
            public static final int DB_MODE_READ_ONLY = 0x800000;
            public static final int DB_USE_AIO = 0x1000000;
            public static final int DB_INCREMENTAL_BACKUP = 0x2000000;
            /**
            * Multibyte string encoding. (This can be used in Parameters.stringEncoding and Encoding annotation.)
            */
            public static final String MULTIBYTE_ENCODING = "UTF-8";
            /**
            * Wide character string encoding. (This can be used in Parameters.stringEncoding and Encoding annotation.)
            */
            public static final String WIDE_CHARACTER_ENCODING = "UTF-16";

            /* Runtime options */
            public static final int RT_OPTION_EXTHEAPS           = 0;
            public static final int RT_WINDOWS_SHM_OPT           = 1;
            public static final int RT_OPTION_MARK_LAST_OBJ      = 2;
            public static final int RT_OPTION_UNIX_SHM_MASK      = 3;
            public static final int RT_POSIX_SHM_OPT             = 4;
            public static final int RT_CRC_ALGORITHM             = 5;
            public static final int RT_MAX_PATRICIA_DEPTH        = 6;
            public static final int RT_MAX_DYNAMIC_PIPES         = 7;
            public static final int RT_OPTION_CLASS_LOAD_MERGE   = 8;
            public static final int RT_OPTION_DATETIME_PRECISION = 9;

            /* Cluster options */
            public static final int SOCK_INET_DOMAIN  = 0;
            public static final int SOCK_LOCAL_DOMAIN = 1;
            public static final int SOCK_SDP_DOMAIN   = 2;
            public static final int CLUSTER_MPI_BUSYWAIT         = 0x1;
            public static final int CLUSTER_MPI_SERIALIZED_SEND  = 0x2;
            public static final int CLUSTER_MODE_DEBUG_OUTPUT     = 0x1;
            public static final int CLUSTER_MODE_EARLY_DATA_SEND  = 0x2;
            public static final int CLUSTER_MODE_BINARY_EVOLUTION = 0x4;

            /* Backup options */
            public static final int BACKUP_FLAG_COMPRESSED = 1;
            public static final int BACKUP_FLAG_ENCRYPTED  = 2;

            /* SSL options */
            public static final int VERIFY_NONE = 0x0;
            public static final int VERIFY_PEER = 0x01;
            public static final int VERIFY_FAIL_IF_NO_PEER_CERT = 0x02;
            public static final int VERIFY_CLIENT_ONCE = 0x04;

            /* Runtime Configuration options */
            public static final int MCO_CFG_DEBUG_LIBRARY = 1;
            public static final int MCO_CFG_MVCC_TRANSACTION_MANAGER = 2;
            public static final int MCO_CFG_SHARED_MEMORY = 4;
            public static final int MCO_CFG_DISK_SUPPORT = 8;
            public static final int MCO_CFG_HA_SUPPORT = 16;
            public static final int MCO_CFG_CLUSTER_SUPPORT = 32;
            public static final int MCO_CFG_MPI_CLUSTER_SUPPORT = 64;
            public static final int MCO_CFG_TL_SUPPORT = 128;
            public static final int MCO_CFG_SQL_SUPPORT = 256;
            public static final int MCO_CFG_SEQUENCE_SUPPORT = 512;
            public static final int MCO_CFG_LOAD_ASSEMBLY = 1024;
            public static final int MCO_CFG_USE_POSIX_LIBRARIES = 2048;
            public static final int MCO_CFG_DISK_COMPRESSION = 4096;

            /* eXtremeDB Field types */
            final static int MCO_DB_FT_NONE =       0;
            final static int MCO_DB_FT_UINT1 =      1;
            final static int MCO_DB_FT_UINT2 =      2;
            final static int MCO_DB_FT_UINT4 =      3;
            final static int MCO_DB_FT_INT1 =       4;
            final static int MCO_DB_FT_INT2 =       5;
            final static int MCO_DB_FT_INT4 =       6;
            final static int MCO_DB_FT_CHARS =      7;
            final static int MCO_DB_FT_STRING =     8;
            final static int MCO_DB_FT_REF =        9;
            final static int MCO_DB_FT_FLOAT =      10;
            final static int MCO_DB_FT_DOUBLE =     11;
            final static int MCO_DB_FT_UINT8 =      12;
            final static int MCO_DB_FT_INT8 =       13;
            final static int MCO_DB_FT_AUTOID =   14 /* 8 byte =  */;
            final static int MCO_DB_FT_OBJVERS =  15 /* 2 byte =  */;
            final static int MCO_DB_FT_DATE =       16 ;
            final static int MCO_DB_FT_TIME =       17 ;
            final static int MCO_DB_FT_AUTOOID =    18 ;
            final static int MCO_DB_FT_UNICODE_CHARS =      19;
            final static int MCO_DB_FT_UNICODE_STRING =     20;
            final static int MCO_DB_FT_WIDE_CHARS =         21;
            final static int MCO_DB_FT_WCHAR_STRING =       22;
            final static int MCO_DB_FT_BOOL =   23;
            final static int MCO_DB_FT_DATETIME =   24;
            final static int MCO_DB_FT_SEQUENCE_UINT1 = 30;
            final static int MCO_DB_FT_SEQUENCE_UINT2 = 31;
            final static int MCO_DB_FT_SEQUENCE_UINT4 = 32;
            final static int MCO_DB_FT_SEQUENCE_UINT8 = 33;
            final static int MCO_DB_FT_SEQUENCE_INT1  = 34;
            final static int MCO_DB_FT_SEQUENCE_INT2  = 35;
            final static int MCO_DB_FT_SEQUENCE_INT4  = 36;
            final static int MCO_DB_FT_SEQUENCE_INT8  = 37;
            final static int MCO_DB_FT_SEQUENCE_FLOAT = 38;
            final static int MCO_DB_FT_SEQUENCE_DOUBLE = 39;
            final static int MCO_DB_FT_SEQUENCE_CHAR = 40;
            final static int MCO_DB_FT_SEQUENCE_DATETIME = 41;
            final static int MCO_DB_FT_STRUCT =     50;
            final static int MCO_DB_FT_BLOB =       51;
            final static int MCO_DICT_FLDF_VECTOR =       0x01;
            final static int MCO_DICT_FLDF_ARRAY =        0x02;
            final static int MCO_DICT_FLDF_OPTIONAL =     0x04;
            final static int MCO_DICT_FLDF_INDEXED =      0x08;
            final static int MCO_DICT_FLDF_HIDDEN   =     0x10;
            final static int MCO_DICT_FLDF_NULLABLE =     0x20;
            final static int MCO_DICT_FLDF_NULL_INDICATOR = 0x40;
            final static int MCO_DICT_FLDF_NUMERIC        = 0x80;
            final static int MCO_DB_TYPINFO_HAS_LIST =      0x0001;
            final static int MCO_DB_TYPINFO_HAS_OID =       0x0002;
            final static int MCO_DB_TYPINFO_HAS_BLOBS =     0x0004;
            final static int MCO_DB_TYPINFO_COMPACT =       0x0008;
            final static int MCO_DB_TYPINFO_FIXEDREC =      0x0010;
            final static int MCO_DB_TYPINFO_PERSISTENT =    0x0020;
            final static int MCO_DB_TYPINFO_HAS_AUTOID =    0x0040;
            final static int MCO_DB_TYPINFO_HAS_HISTORY =   0x0080;
            final static int MCO_DB_TYPINFO_HAS_EVENTS =    0x0100;
            final static int MCO_DB_TYPINFO_HAS_SEQUENCES = 0x0200;
            final static int MCO_DB_TYPINFO_LOCAL =         0x0400;
            final static int MCO_DB_TYPINFO_DISTRIBUTED =   0x0800;
            final static int MCO_DB_TYPINFO_HIDDEN =        0x1000;
            final static int MCO_DB_TYPINFO_NONATOMIC =     0x2000;
            final static int MCO_DB_INDF_UNIQUE =           0x0004;
            final static int MCO_DB_INDF_VSTRUCT_BASED =    0x0008;
            final static int MCO_DB_INDF_VTYPE_BASED =      0x0010;
            final static int MCO_DB_INDF_V_BASED =        (MCO_DB_INDF_VSTRUCT_BASED | MCO_DB_INDF_VTYPE_BASED);
            final static int MCO_DB_INDF_PERSISTENT =       0x0020;
            final static int MCO_DB_INDF_VOLUNTARY =        0x0040;
            final static int MCO_DB_INDF_ASTRUCT_BASED =    0x0080;
            final static int MCO_DB_INDF_ATYPE_BASED =      0x0100;
            final static int MCO_DB_INDF_VOLUNTARY_SAVED =  0x0200;
            final static int MCO_DB_INDF_T_LIST =           0x0400;
            final static int MCO_DB_INDF_T_REGULAR =        0x0800;
            final static int MCO_DB_INDF_T_AUTOID =         0x1000;
            final static int MCO_DB_INDF_T_HISTORY =        0x2000;
            final static int MCO_DB_INDF_NULLABLE =        0x10000;
            final static int MCO_DB_INDF_THICK    =        0x20000;
            final static int MCO_DB_INDF_COMPACT  =        0x40000;
            final static int MCO_DB_INDF_POINT    =        0x80000;
            final static int MCO_DB_INDF_TRIGRAM  =       0x100000;
            final static int scalarSeqElemSize[] = {1,2,4,8,1,2,4,8,4,8,0,8};

            ...
        }

### Definitions

`Database Compression` | Settings affecting database compression
`Database options` | Settings affecting the eXtremeDB database
`Runtime options` | Settings affecting the eXtremeDB runtime
`Cluster options` | Settings affecting the eXtremeDB Cluster runtime
`Backup options` | Settings affecting Incremental Backup
`SSL options` | Settings affecting Secure Socket communications
`Runtime Configuration options` | Settings to enable eXtremeDB runtime features
`eXtremeDB Field types` | Constants used to specify eXtremeDB field types