public static Manager CreateManager(string envdir) { EnvironmentConfig envconf = new EnvironmentConfig(); envconf.CacheSize = 50 * 1024 * 1024; envconf.Create = true; envconf.InitializeCache = true; envconf.Transactional = true; envconf.InitializeLocking = true; envconf.InitializeLogging = true; envconf.Recover = true; ManagerConfig mgrconfig = new ManagerConfig(); mgrconfig.AdoptEnvironment = true; Environment env = new Environment(envdir, envconf); try { return new Manager(env, mgrconfig); } catch(System.Exception e) { env.Dispose(); throw e; } }
public Manager(Sleepycat.Db.Environment env, ManagerConfig config) { if (config.AdoptEnvironment) { env.Disown(); } this.mgr_ = new XmlManager(env.Internal, config.Flags); }
public Manager(ManagerConfig config) : this(new Sleepycat.Db.Environment(), config) { }
public Manager(ManagerConfig config) : this(new Sleepycat.Db.Environment(), config) { }