public static void Config(XmlElement xmlElement, ref MPoolConfig mpoolConfig, bool compulsory) { uint uintValue = new uint(); int intValue = new int(); Configuration.ConfigCacheInfo(xmlElement, "CacheSize", ref mpoolConfig.CacheSize, compulsory); Configuration.ConfigCacheInfo(xmlElement, "MaxCacheSize", ref mpoolConfig.MaxCacheSize, compulsory); if (Configuration.ConfigInt(xmlElement, "MaxOpenFiles", ref intValue, compulsory)) { mpoolConfig.MaxOpenFiles = intValue; } Configuration.ConfigMaxSequentialWrites( xmlElement, "MaxSequentialWrites", mpoolConfig, compulsory); if (Configuration.ConfigUint(xmlElement, "MMapSize", ref uintValue, compulsory)) { mpoolConfig.MMapSize = uintValue; } }
public static void Config(XmlElement xmlElement, ref LockingConfig lockingConfig, bool compulsory) { byte[,] matrix = new byte[6, 6]; uint value = new uint(); if (Configuration.ConfigByteMatrix(xmlElement, "Conflicts", ref matrix, compulsory) == true) { lockingConfig.Conflicts = matrix; } Configuration.ConfigDeadlockPolicy(xmlElement, "DeadlockResolution", ref lockingConfig.DeadlockResolution, compulsory); if (Configuration.ConfigUint(xmlElement, "MaxLockers", ref value, compulsory)) { lockingConfig.MaxLockers = value; } if (Configuration.ConfigUint(xmlElement, "MaxLocks", ref value, compulsory)) { lockingConfig.MaxLocks = value; } if (Configuration.ConfigUint(xmlElement, "MaxObjects", ref value, compulsory)) { lockingConfig.MaxObjects = value; } if (Configuration.ConfigUint(xmlElement, "Partitions", ref value, compulsory)) { lockingConfig.Partitions = value; } }
public static void Config(XmlElement xmlElement, ref SequenceConfig seqConfig, bool compulsory) { uint uintValue = new uint(); bool boolValue = new bool(); long longValue = new long(); if (Configuration.ConfigUint(xmlElement, "CacheSize", ref uintValue, compulsory)) { seqConfig.CacheSize = uintValue; } Configuration.ConfigCreatePolicy(xmlElement, "Creation", ref seqConfig.Creation, compulsory); if (Configuration.ConfigBool(xmlElement, "Decrement", ref boolValue, compulsory)) { seqConfig.Decrement = boolValue; } Configuration.ConfigBool(xmlElement, "FreeThreaded", ref seqConfig.FreeThreaded, compulsory); if (Configuration.ConfigBool(xmlElement, "Increment", ref boolValue, compulsory)) { seqConfig.Increment = boolValue; } if (Configuration.ConfigLong(xmlElement, "InitialValue", ref longValue, compulsory)) { seqConfig.InitialValue = longValue; } Configuration.ConfigBool(xmlElement, "Wrap", ref seqConfig.Wrap, compulsory); }
public static void Config(XmlElement xmlElement, ref MutexConfig mutexConfig, bool compulsory) { uint value = new uint(); if (Configuration.ConfigUint(xmlElement, "Alignment", ref value, compulsory)) { mutexConfig.Alignment = value; } if (Configuration.ConfigUint(xmlElement, "Increment", ref value, compulsory)) { mutexConfig.Increment = value; } if (Configuration.ConfigUint(xmlElement, "MaxMutexes", ref value, compulsory)) { mutexConfig.MaxMutexes = value; } if (Configuration.ConfigUint(xmlElement, "NumTestAndSetSpins", ref value, compulsory)) { mutexConfig.NumTestAndSetSpins = value; } }
public static void Config(XmlElement xmlElement, ref LogConfig logConfig, bool compulsory) { uint uintValue = new uint(); int intValue = new int(); Configuration.ConfigBool(xmlElement, "AutoRemove", ref logConfig.AutoRemove, compulsory); if (Configuration.ConfigUint(xmlElement, "BufferSize", ref uintValue, compulsory)) { logConfig.BufferSize = uintValue; } Configuration.ConfigString(xmlElement, "Dir", ref logConfig.Dir, compulsory); if (Configuration.ConfigInt(xmlElement, "FileMode", ref intValue, compulsory)) { logConfig.FileMode = intValue; } Configuration.ConfigBool(xmlElement, "ForceSync", ref logConfig.ForceSync, compulsory); Configuration.ConfigBool(xmlElement, "InMemory", ref logConfig.InMemory, compulsory); Configuration.ConfigBool(xmlElement, "LogExternalFileContent", ref logConfig.LogExternalFileContent, compulsory); if (Configuration.ConfigUint(xmlElement, "MaxFileSize", ref uintValue, compulsory)) { logConfig.MaxFileSize = uintValue; } Configuration.ConfigBool(xmlElement, "NoBuffer", ref logConfig.NoBuffer, compulsory); Configuration.ConfigBool(xmlElement, "NoSync", ref logConfig.NoSync, compulsory); if (Configuration.ConfigUint(xmlElement, "RegionSize", ref uintValue, compulsory)) { logConfig.RegionSize = uintValue; } Configuration.ConfigBool(xmlElement, "ZeroOnCreate", ref logConfig.ZeroOnCreate, compulsory); }
public static void Config(XmlElement xmlElement, ref DatabaseConfig dbConfig, bool compulsory) { uint pageSize = new uint(); Configuration.ConfigBool(xmlElement, "AutoCommit", ref dbConfig.AutoCommit, compulsory); Configuration.ConfigByteOrder(xmlElement, "ByteOrder", ref dbConfig.ByteOrder, compulsory); Configuration.ConfigCacheInfo(xmlElement, "CacheSize", ref dbConfig.CacheSize, compulsory); Configuration.ConfigBool(xmlElement, "DoChecksum", ref dbConfig.DoChecksum, compulsory); Configuration.ConfigString(xmlElement, "ErrorPrefix", ref dbConfig.ErrorPrefix, compulsory); Configuration.ConfigBool(xmlElement, "FreeThreaded", ref dbConfig.FreeThreaded, compulsory); Configuration.ConfigBool(xmlElement, "NoMMap", ref dbConfig.NoMMap, compulsory); Configuration.ConfigBool(xmlElement, "NonDurableTxns", ref dbConfig.NonDurableTxns, compulsory); if (Configuration.ConfigUint(xmlElement, "PageSize", ref pageSize, compulsory)) { dbConfig.PageSize = pageSize; } Configuration.ConfigCachePriority(xmlElement, "Priority", ref dbConfig.Priority, compulsory); Configuration.ConfigBool(xmlElement, "ReadOnly", ref dbConfig.ReadOnly, compulsory); Configuration.ConfigBool(xmlElement, "ReadUncommitted", ref dbConfig.ReadUncommitted, compulsory); Configuration.ConfigEncryption(xmlElement, "Encryption", dbConfig, compulsory); Configuration.ConfigBool(xmlElement, "Truncate", ref dbConfig.Truncate, compulsory); Configuration.ConfigBool(xmlElement, "UseMVCC", ref dbConfig.UseMVCC, compulsory); }