Package org.neo4j.kernel

Examples of org.neo4j.kernel.EmbeddedGraphDatabase.shutdown()


        assertEquals( correctConfig, graphDb.index().getConfiguration( graphDb.index().forNodes( "wo-provider", MapUtil.stringMap( "type", "exact" ) ) ) );
        assertEquals( correctConfig, graphDb.index().getConfiguration( graphDb.index().forNodes( "w-provider", MapUtil.stringMap( "type", "exact", "provider", "lucene" ) ) ) );
        assertEquals( correctConfig, graphDb.index().getConfiguration( graphDb.index().forRelationships( "default" ) ) );
        assertEquals( correctConfig, graphDb.index().getConfiguration( graphDb.index().forRelationships( "wo-provider", MapUtil.stringMap( "type", "exact" ) ) ) );
        assertEquals( correctConfig, graphDb.index().getConfiguration( graphDb.index().forRelationships( "w-provider", MapUtil.stringMap( "type", "exact", "provider", "lucene" ) ) ) );
        graphDb.shutdown();
       
        removeProvidersFromIndexDbFile( storeDir );
        graphDb = new EmbeddedGraphDatabase( storeDir.getPath() );
        // Getting the index w/o exception means that the provider has been reinstated
        assertEquals( correctConfig, graphDb.index().getConfiguration( graphDb.index().forNodes( "default" ) ) );
View Full Code Here


                storeDir, config );
        XaDataSourceManager xaDsMgr =
                db.getConfig().getTxModule().getXaDataSourceManager();
        XaDataSource xaDs = xaDsMgr.getXaDataSource( "nioneodb" );
        assertTrue( xaDs.isLogicalLogKept() );
        db.shutdown();
       
        config.remove( Config.KEEP_LOGICAL_LOGS );
        db = new EmbeddedGraphDatabase( storeDir, config );
        xaDsMgr = db.getConfig().getTxModule().getXaDataSourceManager();
        xaDs = xaDsMgr.getXaDataSource( "nioneodb" );
View Full Code Here

        config.remove( Config.KEEP_LOGICAL_LOGS );
        db = new EmbeddedGraphDatabase( storeDir, config );
        xaDsMgr = db.getConfig().getTxModule().getXaDataSourceManager();
        xaDs = xaDsMgr.getXaDataSource( "nioneodb" );
        assertTrue( !xaDs.isLogicalLogKept() );
        db.shutdown();

        config.put( Config.KEEP_LOGICAL_LOGS, "true" );
        db = new EmbeddedGraphDatabase( storeDir, config );
        xaDsMgr = db.getConfig().getTxModule().getXaDataSourceManager();
        xaDs = xaDsMgr.getXaDataSource( "nioneodb" );
View Full Code Here

        assertEquals( correctConfig, graphDb.index().getConfiguration( graphDb.index().forNodes( "wo-provider" ) ) );
        assertEquals( correctConfig, graphDb.index().getConfiguration( graphDb.index().forNodes( "w-provider" ) ) );
        assertEquals( correctConfig, graphDb.index().getConfiguration( graphDb.index().forRelationships( "default" ) ) );
        assertEquals( correctConfig, graphDb.index().getConfiguration( graphDb.index().forRelationships( "wo-provider" ) ) );
        assertEquals( correctConfig, graphDb.index().getConfiguration( graphDb.index().forRelationships( "w-provider" ) ) );
        graphDb.shutdown();
    }

    private void removeProvidersFromIndexDbFile( File storeDir )
    {
        IndexStore indexStore = new IndexStore( storeDir.getPath() );
View Full Code Here

      Thread.sleep(5000);
    } catch (InterruptedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    graphDb.shutdown();
    System.out.println("Done!");
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.