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

## Class ProfileStep<S>

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

- All Implemented Interfaces:
    Serializable, Cloneable, Iterator<Traverser.Admin<S>>, Step<S,S>, MemoryComputing<MutableMetrics>

      public final class ProfileStep<S>
      extends AbstractStep<S,S>
      implements MemoryComputing<MutableMetrics>

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

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ProfileStep.ProfileBiOperator`

  - ### 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
    `ProfileStep(Traversal.Admin traversal)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ProfileStep<S>` | `clone()` Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.
    `MemoryComputeKey<MutableMetrics>` | `getMemoryComputeKey()` The `MemoryComputeKey` that will be used by this step.
    `MutableMetrics` | `getMetrics()` Returns `null` if traversal is not iterated or if not locked after strategy application.
    `boolean` | `hasNext()`
    `Traverser.Admin<S>` | `next()`
    `protected Traverser.Admin<S>` | `processNextStart()`
    `void` | `start()` Starts the metrics timer.
    `void` | `stop()` Stops the metrics timer.

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

      `addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hashCode, hasStarts, 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

      `equals, getRequirements`

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

      `forEachRemaining, remove`

- - ### Constructor Detail

    - #### ProfileStep

          public ProfileStep(Traversal.Admin traversal)

  - ### Method Detail

    - #### getMetrics

          public MutableMetrics getMetrics()

      Returns `null` if traversal is not iterated or if not locked after strategy application.

    - #### 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>`

    - #### processNextStart

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

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

    - #### getMemoryComputeKey

          public MemoryComputeKey<MutableMetrics> getMemoryComputeKey()

      Description copied from interface: `MemoryComputing`
      The `MemoryComputeKey` that will be used by this step.
      Specified by:
        `getMemoryComputeKey` in interface `MemoryComputing<MutableMetrics>`
      Returns:
        the MemoryComputeKey to use

    - #### clone

          public ProfileStep<S> 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,S>`
      Overrides:
        `clone` in class `AbstractStep<S,S>`
      Returns:
        The cloned step

    - #### start

          public void start()

      Starts the metrics timer.

    - #### stop

          public void stop()

      Stops the metrics timer.

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