Package com.tinkerpop.gremlin.process.computer.traversal

Examples of com.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram$Builder


    @Override
    public Future<Traversal<S, E>> traversal() {
        return CompletableFuture.<Traversal<S, E>>supplyAsync(() -> {
            try {
                final TraversalVertexProgram vertexProgram = this.program();
                final ComputerResult result = this.graphComputer.program(vertexProgram).submit().get();
                final GraphTraversal<S, S> traversal = result.graph().<S>of();
                return traversal.addStep(new ComputerResultStep<>(traversal, result, vertexProgram, true));
            } catch (final Exception e) {
                throw new IllegalStateException(e.getMessage(), e);
View Full Code Here


    public Object submit(final List<String> args) {
        try {
            final GroovyTraversalScript<?, ?> traversal = GroovyTraversalScript.of(RemoteAcceptor.getScript(String.join(SPACE, args), this.shell)).over(this.giraphGraph).using(this.giraphGraph.compute());
            if (this.useSugarPlugin)
                traversal.withSugar();
            final TraversalVertexProgram vertexProgram = traversal.program();
            final ComputerResult computerResult = traversal.result().get();
            this.shell.getInterp().getContext().setProperty(RESULT, computerResult);

            final GraphTraversal traversal2 = new DefaultGraphTraversal<>();
            traversal2.addStep(new ComputerResultStep<>(traversal2, computerResult, vertexProgram, false));
View Full Code Here

     * @return a new traversal with the starts being the results of the TraversalVertexProgram
     */
    public default Traversal<S, E> submit(final GraphComputer computer) {
        try {
            this.applyStrategies(TraversalEngine.COMPUTER);
            final TraversalVertexProgram vertexProgram = TraversalVertexProgram.build().traversal(this::clone).create();
            final ComputerResult result = computer.program(vertexProgram).submit().get();
            final GraphTraversal<S, S> traversal = result.graph().of();
            return traversal.addStep(new ComputerResultStep<>(traversal, result, vertexProgram, true));
        } catch (final Exception e) {
            throw new IllegalStateException(e.getMessage(), e);
View Full Code Here

TOP

Related Classes of com.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram$Builder

Copyright © 2018 www.massapicom. 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.