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)
  • Constructor Details

    • StaticVertexProgram

      public StaticVertexProgram()
  • Method Details

    • 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 the VertexProgram.storeState(org.apache.commons.configuration2.Configuration) and VertexProgram.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 interface VertexProgram<M>
      Overrides:
      clone in class Object
      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 interface VertexProgram<M>
      Parameters:
      configuration - the configuration to store the state of the VertexProgram in.