Class StaticVertexProgram<M>
java.lang.Object
org.apache.tinkerpop.gremlin.process.computer.util.StaticVertexProgram<M>
- All Implemented Interfaces:
Cloneable,VertexProgram<M>
- Direct Known Subclasses:
GraphComputerTest.MultiScopeVertexProgram,GraphComputerTest.MultiScopeVertexWithEdgeFunctionProgram,GraphComputerTest.VertexProgramA,GraphComputerTest.VertexProgramB,GraphComputerTest.VertexProgramC,GraphComputerTest.VertexProgramD,GraphComputerTest.VertexProgramE,GraphComputerTest.VertexProgramF,GraphComputerTest.VertexProgramG,GraphComputerTest.VertexProgramH,GraphComputerTest.VertexProgramI,GraphComputerTest.VertexProgramJ,GraphComputerTest.VertexProgramK,PeerPressureVertexProgram
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.computer.VertexProgram
VertexProgram.Builder, VertexProgram.Features -
Field Summary
Fields inherited from interface org.apache.tinkerpop.gremlin.process.computer.VertexProgram
VERTEX_PROGRAM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()When multiple workers on a single machine need VertexProgram instances, it is possible to use clone.voidstoreState(org.apache.commons.configuration2.Configuration configuration) When it is necessary to store the state of the VertexProgram, this method is called.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tinkerpop.gremlin.process.computer.VertexProgram
execute, getFeatures, getMapReducers, getMemoryComputeKeys, getMessageCombiner, getMessageScopes, getPreferredPersist, getPreferredResultGraph, getTraverserRequirements, getVertexComputeKeys, loadState, setup, terminate, workerIterationEnd, workerIterationStart
-
Constructor Details
-
StaticVertexProgram
public StaticVertexProgram()
-
-
Method Details
-
clone
Description copied from interface:VertexProgramWhen multiple workers on a single machine need VertexProgram instances, it is possible to use clone. This will provide a speedier way of generating instances, over theVertexProgram.storeState(org.apache.commons.configuration2.Configuration)andVertexProgram.loadState(org.apache.tinkerpop.gremlin.structure.Graph, org.apache.commons.configuration2.Configuration)model. The default implementation simply returns the object as it assumes that the VertexProgram instance is a stateless singleton.- Specified by:
clonein interfaceVertexProgram<M>- Overrides:
clonein classObject- Returns:
- A clone of the VertexProgram object
-
storeState
public void storeState(org.apache.commons.configuration2.Configuration configuration) Description copied from interface:VertexProgramWhen it is necessary to store the state of the VertexProgram, this method is called. This is typically required when the VertexProgram needs to be serialized to another machine. Note that what is stored is simply the instance/configuration state, not any processed data. The default implementation provided simply stores the VertexProgram class name for reflective reconstruction. It is typically a good idea to VertexProgram.super.storeState().- Specified by:
storeStatein interfaceVertexProgram<M>- Parameters:
configuration- the configuration to store the state of the VertexProgram in.
-