Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.GraphDatabaseService.shutdown()


            }
        }
        System.out.println( count );
        assertTrue( count > 4900000000L );*/
       
        db.shutdown();
    }
}
View Full Code Here


        catch ( ReadOnlyDbException e )
        {
            // good
        }
        tx.finish();
        readGraphDb.shutdown();
    }
   
    private DbRepresentation createSomeData()
    {
        DynamicRelationshipType type = withName( "KNOWS" );
View Full Code Here

            rel.setProperty( "since", System.currentTimeMillis() );
        }
        tx.success();
        tx.finish();
        DbRepresentation result = DbRepresentation.of( db );
        db.shutdown();
        return result;
    }

    @Test
    public void testReadOnlyOperationsAndNoTransaction()
View Full Code Here

    @Test
    public void testDefaultCache()
    {
        GraphDatabaseService db = newDb( null );
        assertEquals( CacheType.soft, ((EmbeddedGraphDatabase) db).getConfig().getGraphDbModule().getNodeManager().getCacheType() );
        db.shutdown();
    }

    @Test
    public void testWeakRefCache()
    {
View Full Code Here

    @Test
    public void testWeakRefCache()
    {
        GraphDatabaseService db = newDb( "weak" );
        assertEquals( CacheType.weak, ((EmbeddedGraphDatabase) db).getConfig().getGraphDbModule().getNodeManager().getCacheType() );
        db.shutdown();
    }
   
    @Test
    public void testSoftRefCache()
    {
View Full Code Here

    @Test
    public void testSoftRefCache()
    {
        GraphDatabaseService db = newDb( "soft" );
        assertEquals( CacheType.soft, ((EmbeddedGraphDatabase) db).getConfig().getGraphDbModule().getNodeManager().getCacheType() );
        db.shutdown();
    }

    @Test
    public void testNoCache()
    {
View Full Code Here

    @Test
    public void testNoCache()
    {
        GraphDatabaseService db = newDb( "none" );
        assertEquals( CacheType.none, ((EmbeddedGraphDatabase) db).getConfig().getGraphDbModule().getNodeManager().getCacheType() );
        db.shutdown();
    }

    @Test
    public void testStrongCache()
    {
View Full Code Here

    @Test
    public void testStrongCache()
    {
        GraphDatabaseService db = newDb( "strong" );
        assertEquals( CacheType.strong, ((EmbeddedGraphDatabase) db).getConfig().getGraphDbModule().getNodeManager().getCacheType() );
        db.shutdown();
    }
   
    @Test
    public void testOldCache()
    {
View Full Code Here

    @Test
    public void testOldCache()
    {
        GraphDatabaseService db = newDb( "old" );
        assertEquals( CacheType.old, ((EmbeddedGraphDatabase) db).getConfig().getGraphDbModule().getNodeManager().getCacheType() );
        db.shutdown();
    }

    @Test
    public void testInvalidCache()
    {
View Full Code Here

        Runtime.getRuntime().addShutdownHook( new Thread()
        {
            @Override
            public void run()
            {
                graphDb.shutdown();
            }
        } );
    }
}
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.