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
public abstract class StaticVertexProgram<M> extends Object implements VertexProgram<M>
- 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 Constructor Description StaticVertexProgram()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StaticVertexProgram<M>
clone()
When multiple workers on a single machine need VertexProgram instances, it is possible to use clone.void
storeState(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, wait
-
Methods 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
-
-
-
-
Method Detail
-
clone
public StaticVertexProgram<M> clone()
Description copied from interface:VertexProgram
When 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:
clone
in interfaceVertexProgram<M>
- Overrides:
clone
in classObject
- Returns:
- A clone of the VertexProgram object
-
storeState
public void storeState(org.apache.commons.configuration2.Configuration configuration)
Description copied from interface:VertexProgram
When 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:
storeState
in interfaceVertexProgram<M>
- Parameters:
configuration
- the configuration to store the state of the VertexProgram in.
-
-