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

## Class ProfilingAware.ProfiledBarrier

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.traversal.step.ProfilingAware.ProfiledBarrier

- All Implemented Interfaces:
    Barrier, MemoryComputing
  Enclosing interface:
    ProfilingAware

      public static final class ProfilingAware.ProfiledBarrier
      extends Object
      implements Barrier

  A helper class which holds a `Barrier` and it's related `ProfileStep` so that the latter can have its timer started and stopped appropriately.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProfiledBarrier(Barrier barrier, ProfileStep profileStep)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addBarrier(Object barrier)` Add a barrier to the step.
    `void` | `done()` A way to hard set that the barrier is complete.
    `MemoryComputeKey` | `getMemoryComputeKey()` The `MemoryComputeKey` that will be used by this step.
    `boolean` | `hasNextBarrier()` Whether or not the step has an accessible barrier.
    `Object` | `nextBarrier()` Get the next barrier within this step.
    `void` | `processAllStarts()` Process all left traversers by do not yield the resultant output.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ProfiledBarrier

          public ProfiledBarrier(Barrier barrier,
                                 ProfileStep profileStep)

  - ### Method Detail

    - #### processAllStarts

          public void processAllStarts()

      Description copied from interface: `Barrier`
      Process all left traversers by do not yield the resultant output. This method is useful for steps like `ReducingBarrierStep`, where traversers can be processed "on the fly" and thus, reduce memory consumption.
      Specified by:
        `processAllStarts` in interface `Barrier`

    - #### hasNextBarrier

          public boolean hasNextBarrier()

      Description copied from interface: `Barrier`
      Whether or not the step has an accessible barrier.
      Specified by:
        `hasNextBarrier` in interface `Barrier`
      Returns:
        whether a barrier exists or not

    - #### nextBarrier

          public Object nextBarrier()
                             throws NoSuchElementException

      Description copied from interface: `Barrier`
      Get the next barrier within this step. Barriers from parallel steps can be the be merged to create a single step with merge barriers.
      Specified by:
        `nextBarrier` in interface `Barrier`
      Returns:
        the next barrier of the step
      Throws:
        `NoSuchElementException`

    - #### addBarrier

          public void addBarrier(Object barrier)

      Description copied from interface: `Barrier`
      Add a barrier to the step. This typically happens when multiple parallel barriers need to become one barrier at a single step.
      Specified by:
        `addBarrier` in interface `Barrier`
      Parameters:
        `barrier` - the barrier to merge in

    - #### getMemoryComputeKey

          public MemoryComputeKey getMemoryComputeKey()

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

    - #### done

          public void done()

      Description copied from interface: `Barrier`
      A way to hard set that the barrier is complete. This is necessary when parallel barriers don't all have barriers and need hard resetting. The default implementation does nothing.
      Specified by:
        `done` in interface `Barrier`

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