Class ByModulatorOptimizationStrategy
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy>
-
- org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ByModulatorOptimizationStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<Class<? extends TraversalStrategy>>
,TraversalStrategy<TraversalStrategy.OptimizationStrategy>
,TraversalStrategy.OptimizationStrategy
public final class ByModulatorOptimizationStrategy extends AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy> implements TraversalStrategy.OptimizationStrategy
This strategy looks for standard traversals in by-modulators and replaces them with more optimized traversals (e.g.TokenTraversal
) if possible.- Author:
- Daniel Kuppitz (http://gremlin.guru), Stephen Mallette (http://stephen.genoprime.com)
- See Also:
- Serialized Form
- Example:
__.path().by(id()) // is replaced by __.path().by(id) __.dedup().by(label()) // is replaced by __.dedup().by(label) __.order().by(values("name")) // is replaced by __.order().by("name") __.group().by().by(values("name").fold()) // is replaced by __.group().by("name")
-
-
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 Description void
apply(Traversal.Admin<?,?> traversal)
Set<Class<? extends TraversalStrategy.OptimizationStrategy>>
applyPrior()
The set of strategies that must be executed before this strategy is executed.static ByModulatorOptimizationStrategy
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
applyPost, getConfiguration
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy.OptimizationStrategy
compareTo, getTraversalCategory
-
-
-
-
Method Detail
-
instance
public static ByModulatorOptimizationStrategy instance()
-
apply
public void apply(Traversal.Admin<?,?> traversal)
- Specified by:
apply
in interfaceTraversalStrategy<TraversalStrategy.OptimizationStrategy>
-
applyPrior
public Set<Class<? extends TraversalStrategy.OptimizationStrategy>> applyPrior()
Description copied from interface:TraversalStrategy
The set of strategies that must be executed before this strategy is executed. If there are no ordering requirements, the default implementation returns an empty set.- Specified by:
applyPrior
in interfaceTraversalStrategy<TraversalStrategy.OptimizationStrategy>
- Returns:
- the set of strategies that must be executed prior to this one.
-
-