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

## Class StaticMapReduce<MK,MV,RK,RV,R>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.computer.util.StaticMapReduce<MK,MV,RK,RV,R>

- All Implemented Interfaces:
    Cloneable, MapReduce<MK,MV,RK,RV,R>
  Direct Known Subclasses:
    ClusterCountMapReduce, ClusterPopulationMapReduce, GraphComputerTest.MapReduceB, GraphComputerTest.MapReduceBB, GraphComputerTest.MapReduceC, GraphComputerTest.MapReduceK, PageRankMapReduce

      public abstract class StaticMapReduce<MK,MV,RK,RV,R>
      extends Object
      implements MapReduce<MK,MV,RK,RV,R>

  Author:
    Marko A. Rodriguez (http://markorodriguez.com)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.computer.MapReduce

      `MapReduce.MapEmitter<K,V>, MapReduce.NullObject, MapReduce.ReduceEmitter<OK,OV>, MapReduce.Stage`

  - ### Field Summary

    - ### Fields inherited from interface org.apache.tinkerpop.gremlin.process.computer.MapReduce

      `MAP_REDUCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StaticMapReduce()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MapReduce<MK,MV,RK,RV,R>` | `clone()` When multiple workers on a single machine need MapReduce instances, it is possible to use clone.
    `boolean` | `equals(Object object)`
    `int` | `hashCode()`
    `void` | `storeState(Configuration configuration)` When it is necessary to store the state of a MapReduce job, this method is called.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.computer.MapReduce

      `addResultToMemory, combine, createMapReduce, doStage, generateFinalResult, getMapKeySort, getMemoryKey, getReduceKeySort, loadState, map, reduce, workerEnd, workerStart`

- - ### Constructor Detail

    - #### StaticMapReduce

          public StaticMapReduce()

  - ### Method Detail

    - #### clone

          public MapReduce<MK,MV,RK,RV,R> clone()

      Description copied from interface: `MapReduce`
      When multiple workers on a single machine need MapReduce instances, it is possible to use clone. This will provide a speedier way of generating instances, over the `MapReduce.storeState(Configuration)` and `MapReduce.loadState(org.apache.tinkerpop.gremlin.structure.Graph, Configuration)` model. The default implementation simply returns the object as it assumes that the MapReduce instance is a stateless singleton.
      Specified by:
        `clone` in interface `MapReduce<MK,MV,RK,RV,R>`
      Overrides:
        `clone` in class `Object`
      Returns:
        A clone of the MapReduce object

    - #### storeState

          public void storeState(Configuration configuration)

      Description copied from interface: `MapReduce`
      When it is necessary to store the state of a MapReduce job, this method is called. This is typically required when the MapReduce job needs to be serialized to another machine. Note that what is stored is simply the instance state, not any processed data.
      Specified by:
        `storeState` in interface `MapReduce<MK,MV,RK,RV,R>`
      Parameters:
        `configuration` - the configuration to store the state of the MapReduce job in.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object object)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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