Package com.tinkerpop.blueprints

Examples of com.tinkerpop.blueprints.KeyIndexableGraph.shutdown()


            assertEquals(graph.getEdges("date", 2012).iterator().next(), edge);
            graph.createKeyIndex("date", Edge.class);
            assertEquals(count(graph.getEdges("date", 2012)), 1);
            assertEquals(graph.getEdges("date", 2012).iterator().next(), edge);
        }
        graph.shutdown();
    }

    public void testNoConcurrentModificationException() {
        KeyIndexableGraph graph = (KeyIndexableGraph) graphTest.generateGraph();
        if (graph.getFeatures().supportsEdgeKeyIndex) {
View Full Code Here


            assertEquals(counter, 25);
            if (graph.getFeatures().supportsVertexIteration) assertEquals(count(graph.getVertices()), 50);
            if (graph.getFeatures().supportsEdgeIteration) assertEquals(count(graph.getEdges()), 0);

        }
        graph.shutdown();
    }

    public void testKeyIndicesConsistentWithElementRemoval() throws Exception {
        KeyIndexableGraph graph = (KeyIndexableGraph) graphTest.generateGraph();
View Full Code Here

        graph.removeVertex(v1);
        vertexCount(graph, 0);
        assertEquals(0, count(graph.getVertices("foo", "42")));

        graph.shutdown();
    }

    public void testUpdateValuesInIndexKeys() throws Exception {
        KeyIndexableGraph graph = (KeyIndexableGraph) graphTest.generateGraph();
View Full Code Here

        assertEquals(v1.getProperty("name"), "marko a. rodriguez");
        vertexCount(graph, 1);
        if (graph instanceof TransactionalGraph)
            ((TransactionalGraph) graph).commit();

        graph.shutdown();
    }
}
View Full Code Here

        v1.setProperty("age", 99);
        ((SparkseeGraph) graph).label.set("people");
        assertTrue(graph.getVertices("age", 99).iterator().next().equals(v1));

        printPerformance(graph.toString(), null, "testKeyIndex", this.stopWatch());
        graph.shutdown();
    }

    public void testTx() {
        TransactionalGraph graph = (TransactionalGraph) graphTest.generateGraph();
        ((SparkseeGraph) graph).typeScope.set(true);
View Full Code Here

        try {
            graph.getIndexedKeys(null);
        } catch (IllegalArgumentException iae) {
            return;
        } finally {
            graph.shutdown();
        }

        fail();
    }
View Full Code Here

        try {
            graph.createKeyIndex("test", null);
        } catch (IllegalArgumentException iae) {
            return;
        } finally {
            graph.shutdown();
        }

        fail();
    }
View Full Code Here

        try {
            graph.dropKeyIndex("test", null);
        } catch (IllegalArgumentException iae) {
            return;
        } finally {
            graph.shutdown();
        }

        fail();
    }
View Full Code Here

            printPerformance(graph.toString(), 2, "automatic index keys added", this.stopWatch());
            assertEquals(graph.getIndexedKeys(Edge.class).size(), 2);
            assertTrue(graph.getIndexedKeys(Edge.class).contains("weight"));
            assertTrue(graph.getIndexedKeys(Edge.class).contains("since"));
        }
        graph.shutdown();

        if (graph.getFeatures().isPersistent) {
            graph = (KeyIndexableGraph) graphTest.generateGraph();
            if (graph.getFeatures().supportsVertexKeyIndex) {
                assertEquals(graph.getIndexedKeys(Vertex.class).size(), 2);
View Full Code Here

            if (graph.getFeatures().supportsEdgeKeyIndex) {
                assertEquals(graph.getIndexedKeys(Edge.class).size(), 2);
                assertTrue(graph.getIndexedKeys(Edge.class).contains("weight"));
                assertTrue(graph.getIndexedKeys(Edge.class).contains("since"));
            }
            graph.shutdown();
        }
    }

//    public void testAutoIndexKeyDroppingWithPersistence() {
//        testAutoIndexKeyManagementWithPersistence();
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.