Examples of VertexProgram


Examples of com.tinkerpop.gremlin.process.computer.VertexProgram

    }

    @Override
    public void compute(final Iterable<GremlinWritable> messages) {
        if (null == this.tinkerVertex) inflateTinkerVertex();
        final VertexProgram vertexProgram = ((GiraphWorkerContext) this.getWorkerContext()).getVertexProgram();
        final GiraphMemory memory = ((GiraphWorkerContext) this.getWorkerContext()).getMemory();
        final GiraphMessenger messenger = ((GiraphWorkerContext) this.getWorkerContext()).getMessenger(this, messages);
        ///////////
        if (!(Boolean) ((RuleWritable) this.getAggregatedValue(Constants.GREMLIN_GIRAPH_HALT)).getObject())
            vertexProgram.execute(this.tinkerVertex, messenger, memory)// TODO provide a wrapper around TinkerVertex for Edge and non-ComputeKeys manipulation
        else if (this.getConf().getBoolean(Constants.GREMLIN_GIRAPH_DERIVE_MEMORY, false)) {
            final Map<String, Object> memoryMap = new HashMap<>(memory.asMap());
            memoryMap.put(Constants.SYSTEM_ITERATION, memory.getIteration() - 1);
            this.tinkerVertex.singleProperty(Constants.MEMORY_MAP, memoryMap);
        }
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.