org.apache.tinkerpop.gremlin.process.traversal.step.util

## Class ComputerAwareStep<S,E>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,E>
  - - org.apache.tinkerpop.gremlin.process.traversal.step.util.ComputerAwareStep<S,E>

- All Implemented Interfaces:
    Serializable, Cloneable, Iterator<Traverser.Admin<E>>, Step<S,E>, GraphComputing
  Direct Known Subclasses:
    BranchStep, MatchStep, RepeatStep, RepeatStep.RepeatEndStep

      public abstract class ComputerAwareStep<S,E>
      extends AbstractStep<S,E>
      implements GraphComputing

  Author:
    Marko A. Rodriguez (http://markorodriguez.com)
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ComputerAwareStep.EndStep<S>`

  - ### Field Summary

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep

      `id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ComputerAwareStep(Traversal.Admin traversal)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ComputerAwareStep<S,E>` | `clone()` Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.
    `protected abstract Iterator<Traverser.Admin<E>>` | `computerAlgorithm()`
    `void` | `onGraphComputer()` The step will be executing on a `GraphComputer`.
    `protected Traverser.Admin<E>` | `processNextStart()`
    `void` | `reset()` Reset the state of the step such that it has no incoming starts.
    `protected abstract Iterator<Traverser.Admin<E>>` | `standardAlgorithm()`

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep

      `addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hashCode, hasNext, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStep, setTraversal, toString`

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

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

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.GraphComputing

      `atMaster, atMaster`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Step

      `equals, getRequirements`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining, remove`

- - ### Constructor Detail

    - #### ComputerAwareStep

          public ComputerAwareStep(Traversal.Admin traversal)

  - ### Method Detail

    - #### processNextStart

          protected Traverser.Admin<E> processNextStart()
                                                 throws NoSuchElementException

      Specified by:
        `processNextStart` in class `AbstractStep<S,E>`
      Throws:
        `NoSuchElementException`

    - #### onGraphComputer

          public void onGraphComputer()

      Description copied from interface: `GraphComputing`
      The step will be executing on a `GraphComputer`.
      Specified by:
        `onGraphComputer` in interface `GraphComputing`

    - #### clone

          public ComputerAwareStep<S,E> clone()

      Description copied from interface: `Step`
      Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication. When cloning a step, it is important that the steps, the cloned step is equivalent to the state of the step when `Step.reset()` is called. Moreover, the previous and next steps should be set to `EmptyStep`.
      Specified by:
        `clone` in interface `Step<S,E>`
      Overrides:
        `clone` in class `AbstractStep<S,E>`
      Returns:
        The cloned step

    - #### reset

          public void reset()

      Description copied from interface: `Step`
      Reset the state of the step such that it has no incoming starts. Internal states are to be reset, but any sideEffect data structures are not to be recreated.
      Specified by:
        `reset` in interface `Step<S,E>`
      Overrides:
        `reset` in class `AbstractStep<S,E>`

    - #### standardAlgorithm

          protected abstract Iterator<Traverser.Admin<E>> standardAlgorithm()
                                                                     throws NoSuchElementException

      Throws:
        `NoSuchElementException`

    - #### computerAlgorithm

          protected abstract Iterator<Traverser.Admin<E>> computerAlgorithm()
                                                                     throws NoSuchElementException

      Throws:
        `NoSuchElementException`

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