Class MatchPredicateStrategy
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy>
org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.MatchPredicateStrategy
- All Implemented Interfaces:
Serializable,Comparable<Class<? extends TraversalStrategy>>,TraversalStrategy<TraversalStrategy.OptimizationStrategy>,TraversalStrategy.OptimizationStrategy
public final class MatchPredicateStrategy
extends AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy>
implements TraversalStrategy.OptimizationStrategy
MatchWhereStrategy will fold any post-where() step that maintains a traversal constraint into
match(). MatchStep is intelligent with traversal constraint applications and thus, can more
efficiently use the constraint of WhereTraversalStep or WherePredicateStep.- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
- Example:
__.match(a,b).where(c) // is replaced by __.match(a,b,c) __.match(a,b).select().where(c) // is replaced by __.match(a,b,c).select()
-
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(Traversal.Admin<?, ?> traversal) The transformation the strategy applies to the traversal.Set<Class<? extends TraversalStrategy.OptimizationStrategy>>TheGValueReductionStrategyshould be the last TinkerPop optimnization strategy applied.Set<Class<? extends TraversalStrategy.OptimizationStrategy>>The set of strategies that must be executed before this strategy is executed.static MatchPredicateStrategyinstance()Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy
getConfigurationMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy.OptimizationStrategy
compareTo, getTraversalCategory
-
Method Details
-
apply
Description copied from interface:TraversalStrategyThe transformation the strategy applies to the traversal.- Specified by:
applyin interfaceTraversalStrategy<TraversalStrategy.OptimizationStrategy>
-
instance
-
applyPrior
Description copied from interface:TraversalStrategyThe 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:
applyPriorin interfaceTraversalStrategy<TraversalStrategy.OptimizationStrategy>- Returns:
- the set of strategies that must be executed prior to this one.
-
applyPost
Description copied from interface:TraversalStrategy.OptimizationStrategyTheGValueReductionStrategyshould be the last TinkerPop optimnization strategy applied. Adding it here ensures will help to enforce that more globally. Implementations overriding this method should have a good reason to ignore this.- Specified by:
applyPostin interfaceTraversalStrategy<TraversalStrategy.OptimizationStrategy>- Specified by:
applyPostin interfaceTraversalStrategy.OptimizationStrategy- Returns:
- the set of strategies that must be executed post this one
-