Exemple #1
0
        public static void Config(XmlElement xmlElement,
                                  ref DatabaseEnvironmentConfig envConfig, bool compulsory)
        {
            uint     value = new uint();
            DateTime time  = new DateTime();

            Configuration.ConfigBool(xmlElement, "AutoCommit",
                                     ref envConfig.AutoCommit, compulsory);
            Configuration.ConfigBool(xmlElement, "CDB_ALLDB",
                                     ref envConfig.CDB_ALLDB, compulsory);
            Configuration.ConfigBool(xmlElement, "Create",
                                     ref envConfig.Create, compulsory);
            Configuration.ConfigString(xmlElement, "CreationDir",
                                       ref envConfig.CreationDir, compulsory);
            Configuration.ConfigStringList(xmlElement, "DataDirs",
                                           ref envConfig.DataDirs, compulsory);
            Configuration.ConfigString(xmlElement, "ErrorPrefix",
                                       ref envConfig.ErrorPrefix, compulsory);
            Configuration.ConfigBool(xmlElement, "ForceFlush",
                                     ref envConfig.ForceFlush, compulsory);
            Configuration.ConfigBool(xmlElement, "FreeThreaded",
                                     ref envConfig.FreeThreaded, compulsory);
            Configuration.ConfigBool(xmlElement, "InitRegions",
                                     ref envConfig.InitRegions, compulsory);
            Configuration.ConfigString(xmlElement, "IntermediateDirMode",
                                       ref envConfig.IntermediateDirMode, compulsory);
            Configuration.ConfigBool(xmlElement, "Lockdown",
                                     ref envConfig.Lockdown, compulsory);
            if (Configuration.ConfigUint(xmlElement, "LockTimeout",
                                         ref value, compulsory))
            {
                envConfig.LockTimeout = value;
            }
            if (Configuration.ConfigUint(xmlElement, "MaxTransactions",
                                         ref value, compulsory))
            {
                envConfig.MaxTransactions = value;
            }
            Configuration.ConfigBool(xmlElement, "NoBuffer",
                                     ref envConfig.NoBuffer, compulsory);
            Configuration.ConfigBool(xmlElement, "NoLocking",
                                     ref envConfig.NoLocking, compulsory);
            Configuration.ConfigBool(xmlElement, "NoMMap",
                                     ref envConfig.NoMMap, compulsory);
            Configuration.ConfigBool(xmlElement, "NoLocking",
                                     ref envConfig.NoLocking, compulsory);
            Configuration.ConfigBool(xmlElement, "NoPanic",
                                     ref envConfig.NoPanic, compulsory);
            Configuration.ConfigBool(xmlElement, "Overwrite",
                                     ref envConfig.Overwrite, compulsory);
            Configuration.ConfigBool(xmlElement, "Private",
                                     ref envConfig.Private, compulsory);
            Configuration.ConfigBool(xmlElement, "Register",
                                     ref envConfig.Register, compulsory);
            Configuration.ConfigBool(xmlElement, "RunFatalRecovery",
                                     ref envConfig.RunFatalRecovery, compulsory);
            Configuration.ConfigBool(xmlElement, "RunRecovery",
                                     ref envConfig.RunRecovery, compulsory);
            Configuration.ConfigBool(xmlElement, "SystemMemory",
                                     ref envConfig.SystemMemory, compulsory);
            Configuration.ConfigString(xmlElement, "TempDir",
                                       ref envConfig.TempDir, compulsory);
            Configuration.ConfigBool(xmlElement, "TimeNotGranted",
                                     ref envConfig.TimeNotGranted, compulsory);
            Configuration.ConfigBool(xmlElement, "TxnNoSync",
                                     ref envConfig.TxnNoSync, compulsory);
            Configuration.ConfigBool(xmlElement, "TxnNoWait",
                                     ref envConfig.TxnNoWait, compulsory);
            Configuration.ConfigBool(xmlElement, "TxnSnapshot",
                                     ref envConfig.TxnSnapshot, compulsory);
            if (Configuration.ConfigDateTime(xmlElement, "TxnTimestamp",
                                             ref time, compulsory))
            {
                envConfig.TxnTimestamp = time;
            }
            Configuration.ConfigBool(xmlElement, "TxnWriteNoSync",
                                     ref envConfig.TxnWriteNoSync, compulsory);
            Configuration.ConfigBool(xmlElement, "UseLocking",
                                     ref envConfig.UseLocking, compulsory);
            Configuration.ConfigBool(xmlElement, "UseLogging",
                                     ref envConfig.UseLogging, compulsory);
            Configuration.ConfigBool(xmlElement, "UseMPool",
                                     ref envConfig.UseMPool, compulsory);
            Configuration.ConfigBool(xmlElement, "UseMVCC",
                                     ref envConfig.UseMVCC, compulsory);
            Configuration.ConfigBool(xmlElement, "UseReplication",
                                     ref envConfig.UseReplication, compulsory);
            Configuration.ConfigBool(xmlElement, "UseTxns",
                                     ref envConfig.UseTxns, compulsory);
            envConfig.Verbosity = new VerboseMessages();
            Configuration.ConfigVerboseMessages(xmlElement,
                                                "Verbosity", ref envConfig.Verbosity, compulsory);
            Configuration.ConfigBool(xmlElement, "YieldCPU",
                                     ref envConfig.YieldCPU, compulsory);
        }