Package com.graphaware.runtime

Examples of com.graphaware.runtime.GraphAwareRuntime.start()


    @Before
    public void setUp() {
        database = new TestGraphDatabaseFactory().newImpermanentDatabase();
        GraphAwareRuntime runtime = GraphAwareRuntimeFactory.createRuntime(database);
        runtime.registerModule(new FriendshipStrengthModule("FSM", database));
        runtime.start();
    }

    @After
    public void tearDown() {
        database.shutdown();
View Full Code Here


    }

    @Test
    public void clearGraphWithRuntimeShouldDeleteAllNodesAndRelsButNotGraphProps() {
        GraphAwareRuntime runtime = GraphAwareRuntimeFactory.createRuntime(getDatabase());
        runtime.start();

        try (Transaction tx = getDatabase().beginTx()) {
            String cypher = "CREATE " +
                    "(blue:Blue {name:'Blue'})<-[:REL]-(red1:Red {name:'Red'})-[:REL]->(black1:Black {name:'Black'})-[:REL]->(green:Green {name:'Green'})," +
                    "(red2:Red {name:'Red'})-[:REL]->(black2:Black {name:'Black'})";
View Full Code Here

    }

    @Test
    public void equalGraphsWithRuntimeShouldPassSameGraphTestBusinessStrategies() {
        GraphAwareRuntime runtime = GraphAwareRuntimeFactory.createRuntime(getDatabase());
        runtime.start();

        String assertCypher = "CREATE " +
                "(blue:Blue {name:'Blue'})<-[:REL]-(red1:Red {name:'Red'})-[:REL]->(black1:Black {name:'Black'})-[:REL]->(green:Green {name:'Green'})," +
                "(red2:Red {name:'Red'})-[:REL]->(black2:Black {name:'Black'})";
        populateDatabase(assertCypher);
View Full Code Here

        new Thread(new Runnable() {
            @Override
            public void run() {
                if (database.isAvailable(5 * 60 * 1000)) {
                    runtime.start();
                    LOG.info("GraphAware Runtime automatically started.");
                } else {
                    LOG.error("Could not start GraphAware Runtime because the database didn't get to a usable state within 5 minutes.");
                }
            }
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.