private void SetupDb(GraphDatabaseSettings.SchemaIndex schemaIndex)
        {
            TestGraphDatabaseFactory dbFactory = new TestGraphDatabaseFactory();
            GraphDatabaseBuilder     builder   = dbFactory.NewEmbeddedDatabaseBuilder(_directory.storeDir()).setConfig(GraphDatabaseSettings.default_schema_provider, schemaIndex.providerName());

            _db = builder.NewGraphDatabase();
        }
Beispiel #2
0
        public EmbeddedServer(File storeDir, string serverAddress)
        {
            GraphDatabaseBuilder graphDatabaseBuilder = (new TestGraphDatabaseFactory()).newEmbeddedDatabaseBuilder(storeDir);

            graphDatabaseBuilder.SetConfig(OnlineBackupSettings.online_backup_enabled, Settings.TRUE);
            graphDatabaseBuilder.SetConfig(OnlineBackupSettings.online_backup_server, serverAddress);
            graphDatabaseBuilder.SetConfig(GraphDatabaseSettings.pagecache_memory, "8m");
            this._db = graphDatabaseBuilder.NewGraphDatabase();
        }
Beispiel #3
0
        private GraphDatabaseAPI NewDb(string logPruning, int rotateEveryNTransactions)
        {
            this._rotateEveryNTransactions = rotateEveryNTransactions;
            _fs = new EphemeralFileSystemAbstraction();
            TestGraphDatabaseFactory gdf = new TestGraphDatabaseFactory();

            gdf.FileSystem = new UncloseableDelegatingFileSystemAbstraction(_fs);
            GraphDatabaseBuilder builder = gdf.NewImpermanentDatabaseBuilder();

            builder.setConfig(keep_logical_logs, logPruning);
            this._db = ( GraphDatabaseAPI )builder.NewGraphDatabase();
            _files   = _db.DependencyResolver.resolveDependency(typeof(LogFiles));
            return(_db);
        }
Beispiel #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setup()
        public virtual void Setup()
        {
            _fs        = _fsRule.get();
            _dbBuilder = (new TestGraphDatabaseFactory()).setFileSystem(new UncloseableDelegatingFileSystemAbstraction(_fs)).newImpermanentDatabaseBuilder(_testDir.databaseDir());
            _pageCache = _pcRule.getPageCache(_fs);
        }