org.apache.tinkerpop.gremlin.process.computer.util

## 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 and Description
    `StaticVertexProgram()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StaticVertexProgram<M>` | `clone()` When multiple workers on a single machine need VertexProgram instances, it is possible to use clone.
    `void` | `storeState(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

      `createVertexProgram, execute, getFeatures, getMapReducers, getMemoryComputeKeys, getMessageCombiner, getMessageScopes, getPreferredPersist, getPreferredResultGraph, getTraverserRequirements, getVertexComputeKeys, loadState, setup, terminate, workerIterationEnd, workerIterationStart`

- - ### Constructor Detail

    - #### StaticVertexProgram

          public StaticVertexProgram()

  - ### 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 the `VertexProgram.storeState(Configuration)` and `VertexProgram.loadState(org.apache.tinkerpop.gremlin.structure.Graph, 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(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.

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.