Package com.tinkerpop.gremlin.structure

Examples of com.tinkerpop.gremlin.structure.Graph.features()


        private void ser(final GraphSONGraph graphSONGraph, final JsonGenerator jsonGenerator) throws IOException {
            final Graph g = graphSONGraph.getGraphToSerialize();
            jsonGenerator.writeStartObject();

            if (g.features().graph().variables().supportsVariables())
                jsonGenerator.writeObjectField(GraphSONTokens.VARIABLES, new HashMap<>(g.variables().asMap()));

            jsonGenerator.writeArrayFieldStart(GraphSONTokens.VERTICES);
            if (normalize)
                g.V().order(Comparators.HELD_VERTEX_COMPARATOR).forEachRemaining(FunctionUtils.wrapConsumer(jsonGenerator::writeObject));
View Full Code Here


     * Rollback transactions across all {@link com.tinkerpop.gremlin.structure.Graph} objects.
     */
    public void rollbackAll() {
        graphs.entrySet().forEach(e -> {
            final Graph g = e.getValue();
            if (g.features().graph().supportsTransactions())
                g.tx().rollback();
        });
    }

    /**
 
View Full Code Here

     * Commit transactions across all {@link com.tinkerpop.gremlin.structure.Graph} objects.
     */
    public void commitAll() {
        graphs.entrySet().forEach(e -> {
            final Graph g = e.getValue();
            if (g.features().graph().supportsTransactions())
                g.tx().commit();
        });
    }
}
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.