コード例 #1
0
        public BackendServer(IEnv env, ushort port, CommitLogClient client)
        {
            _env    = env;
            _client = client;
            _port   = port;

            _le = env.GetDatabase("db");
            _le.Open(EnvironmentOpenFlags.MapAsync);

            using (var tx = _le.BeginTransaction()) {
                _ld = tx.OpenDatabase(configuration: new DatabaseConfiguration()
                {
                    Flags = DatabaseOpenFlags.Create
                });
                tx.Commit();
            }

            _store = new Store(_le, _ld);
            _proj  = new Projection(_store);
        }