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

## Class ProfileSideEffectStep<S>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,S>
  - - org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep<S>
    - - org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileSideEffectStep<S>

- All Implemented Interfaces:
    Serializable, Cloneable, Iterator<Traverser.Admin<S>>, Step<S,S>, Generating<DefaultTraversalMetrics,DefaultTraversalMetrics>, GraphComputing, SideEffectCapable<DefaultTraversalMetrics,DefaultTraversalMetrics>

      public final class ProfileSideEffectStep<S>
      extends SideEffectStep<S>
      implements SideEffectCapable<DefaultTraversalMetrics,DefaultTraversalMetrics>, GraphComputing

  Author:
    Bob Briody (http://bobbriody.com)
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_METRICS_KEY`

    - ### 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
    `ProfileSideEffectStep(Traversal.Admin traversal, String sideEffectKey)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DefaultTraversalMetrics` | `generateFinalResult(DefaultTraversalMetrics tm)` Post-process the side-effect and return the post-processed side-effect.
    `String` | `getSideEffectKey()` The side-effect key of the step.
    `boolean` | `hasNext()`
    `Traverser.Admin<S>` | `next()`
    `void` | `onGraphComputer()` The step will be executing on a `GraphComputer`.
    `protected void` | `sideEffect(Traverser.Admin<S> traverser)`

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep

      `processNextStart`

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

      `addLabel, addStart, addStarts, clone, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hashCode, isTraverserStepIdAndLabelsSetByChild, prepareTraversalForNextStep, removeLabel, reset, 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`

- - ### Field Detail

    - #### DEFAULT_METRICS_KEY

          public static final String DEFAULT_METRICS_KEY

  - ### Constructor Detail

    - #### ProfileSideEffectStep

          public ProfileSideEffectStep(Traversal.Admin traversal,
                                       String sideEffectKey)

  - ### Method Detail

    - #### sideEffect

          protected void sideEffect(Traverser.Admin<S> traverser)

      Specified by:
        `sideEffect` in class `SideEffectStep<S>`

    - #### getSideEffectKey

          public String getSideEffectKey()

      Description copied from interface: `SideEffectCapable`
      The side-effect key of the step.
      Specified by:
        `getSideEffectKey` in interface `SideEffectCapable<DefaultTraversalMetrics,DefaultTraversalMetrics>`
      Returns:
        the side-effect key

    - #### next

          public Traverser.Admin<S> next()

      Specified by:
        `next` in interface `Iterator<Traverser.Admin<S>>`
      Overrides:
        `next` in class `AbstractStep<S,S>`

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<Traverser.Admin<S>>`
      Overrides:
        `hasNext` in class `AbstractStep<S,S>`

    - #### generateFinalResult

          public DefaultTraversalMetrics generateFinalResult(DefaultTraversalMetrics tm)

      Description copied from interface: `Generating`
      Post-process the side-effect and return the post-processed side-effect. The default implementation is simply the identity function and returns the argument.
      Specified by:
        `generateFinalResult` in interface `Generating<DefaultTraversalMetrics,DefaultTraversalMetrics>`
      Parameters:
        `tm` - the pre-processed side-effect.
      Returns:
        the post-processed side-effect.

    - #### onGraphComputer

          public void onGraphComputer()

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

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