org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization

## Class OrderLimitStrategy

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy>
  - - org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.OrderLimitStrategy

- All Implemented Interfaces:
    Serializable, Comparable<Class<? extends TraversalStrategy>>, TraversalStrategy<TraversalStrategy.OptimizationStrategy>, TraversalStrategy.OptimizationStrategy

      public final class OrderLimitStrategy
      extends AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy>
      implements TraversalStrategy.OptimizationStrategy

  `OrderLimitStrategy` is an OLAP strategy that folds a `RangeGlobalStep` into a preceding `OrderGlobalStep`. This helps to eliminate traversers early in the traversal and can significantly reduce the amount of memory required by the OLAP execution engine. It's worth noting that certain steps are allowed between `OrderGlobalStep` and `RangeGlobalStep`:

  - `IdStep`
  - `LabelStep`
  - `SackStep`
  - `SelectOneStep`
  - `SelectStep`
  - `PathStep`
  - `TreeStep`

  These steps will be ignored by the `OrderLimitStrategy` and thus not affect its behavior.
  Author:
    Marko A. Rodriguez (http://markorodriguez.com)
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy

      `TraversalStrategy.DecorationStrategy, TraversalStrategy.FinalizationStrategy, TraversalStrategy.OptimizationStrategy, TraversalStrategy.ProviderOptimizationStrategy, TraversalStrategy.VerificationStrategy`

  - ### Field Summary

    - ### Fields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy

      `STRATEGY`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `apply(Traversal.Admin<?,?> traversal)`
    `static OrderLimitStrategy` | `instance()`

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy

      `equals, hashCode, toString`

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

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

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

      `compareTo, getTraversalCategory`

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

      `applyPost, applyPrior, getConfiguration`

- - ### Method Detail

    - #### apply

          public void apply(Traversal.Admin<?,?> traversal)

      Specified by:
        `apply` in interface `TraversalStrategy<TraversalStrategy.OptimizationStrategy>`

    - #### instance

          public static OrderLimitStrategy instance()

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