Package org.neo4j.kernel

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


        }
        finally
        {
            transaction.finish();
        }
        service.shutdown();
    }
}
View Full Code Here


        {
            verify( masterOfflineDb, slaveOfflineDbs );
        }
        finally
        {
            masterOfflineDb.shutdown();
            for ( GraphDatabaseService db : slaveOfflineDbs )
            {
                db.shutdown();
            }
        }
View Full Code Here

                {
                    verify( masterDb, slaveDb );
                }
                finally
                {
                    slaveDb.shutdown();
                }
            }
        }
        finally
        {
View Full Code Here

            sleepNice( 100 );
        }
       
        // Start up and let it recover
        final GraphDatabaseService newGraphDb = new EmbeddedGraphDatabase( getDbPath() );
        newGraphDb.shutdown();
    }
   
    private static void sleepNice( long time )
    {
        try
View Full Code Here

                  throw new IllegalStateException( node + " has property '" + key + "'='" +
                          value + "', but not in index" );
              }
          }
      }
      db.shutdown();
    }
   
    @Test
    public void testAsLittleAsPossibleRecoveryScenario() throws Exception
    {
View Full Code Here

        assertEquals( nodeAboveTheLine, edb.getNodeById( highMark ).getId() );
        assertEquals( relBelowTheLine, edb.getNodeById( idBelow ).getSingleRelationship( this, Direction.OUTGOING ).getId() );
        assertEquals( relAboveTheLine, edb.getNodeById( idBelow ).getSingleRelationship( this, Direction.INCOMING ).getId() );
        assertEquals(   asSet( asList( edb.getRelationshipById( relBelowTheLine ), edb.getRelationshipById( relAboveTheLine ) ) ),
                        asSet( asCollection( edb.getNodeById( idBelow ).getRelationships() ) ) );
        edb.shutdown();
        db = new BatchInserterImpl( PATH );
    }
   
    @Test( expected=IllegalArgumentException.class )
    public void makeSureCantCreateNodeWithMagicNumber()
View Full Code Here

        }
        assertEquals( 2, rels.size() );
       
        tx.success();
        tx.finish();
        graphDb.shutdown();
    }
}
View Full Code Here

        {
            return of( db );
        }
        finally
        {
            db.shutdown();
        }
    }
   
    public long getHighestNodeId()
    {
View Full Code Here

        assertTrue( handler1 == graphDb.unregisterKernelEventHandler(
                handler1 ) );
        assertTrue( handler2 == graphDb.unregisterKernelEventHandler(
                handler2 ) );

        graphDb.shutdown();
    }

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

            }
        };
        graphDb.registerKernelEventHandler( handler1 );
        graphDb.registerKernelEventHandler( handler2 );

        graphDb.shutdown();

        assertEquals( Integer.valueOf( 0 ), handler2.beforeShutdown );
        assertEquals( Integer.valueOf( 1 ), handler1.beforeShutdown );
    }
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.