Package org.neo4j.kernel

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


        kmlBuilder.finish();
        kmlBuilder.writeToFile(new File("siem-reap.kml"));


        //Close Neo4j
        db.shutdown();

    }

    private Node getStartNode(GraphDatabaseService db) {
        return db.index().forNodes("nodes").get(OsmEntityAttributeKey.NODE_ID.name(), START_NODE_ID).getSingle();
View Full Code Here


       * @see java.lang.Thread#run()
       */
      @Override
      public void run() {
        System.out.print("\n==> Shutdown cleanly the database...");
        graphDatabase.shutdown();
        System.out.println("OK");
      }
    });

    /* Add nodes (members in our sample) and relationships between them */
 
View Full Code Here

   
    BuildIndices bi = new BuildIndices();
    bi.setGraphDB(graphDB);
    bi.buildSearchIndex();
   
    graphDB.shutdown();
  }

}
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

        tx.success();
        tx.finish();
       
        Pair<Pair<File, File>, Pair<File, File>> copy = copyLogicalLog( storeDir );
        decrementLogFormat( copy.other().other() );
        db.shutdown();
        renameCopiedLogicalLog( storeDir );
       
        try
        {
            db = new EmbeddedGraphDatabase( storeDir );
View Full Code Here

            }
        }
        System.out.println( count );
        assertTrue( count > 4900000000L );*/
       
        db.shutdown();
    }
}
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

        // would wait for ever since tx2 has write lock but now we have other
        // thread thread that will commit tx2
        refNode.removeProperty( "test2" );
        assertTrue( thread.success() );
        tm.commit();
        neo2.shutdown();
    }

    private static class CommitThread extends Thread
    {
        private final TransactionManager tm;
View Full Code Here

        }
        // END SNIPPET: removingData

        System.out.println( "Shutting down database ..." );
        // START SNIPPET: shutdownServer
        graphDb.shutdown();
        // END SNIPPET: shutdownServer
    }

    private static void registerShutdownHook( final GraphDatabaseService graphDb )
    {
View Full Code Here

        finally
        {
            transaction.finish();
        }
        assertFalse( graphDb.index().existsForNodes( "actors" ) );
        graphDb.shutdown();
    }

    @Test
    public void removeFromIndex()
    {
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.