Class GValueReductionStrategy
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy>
org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.GValueReductionStrategy
- All Implemented Interfaces:
Serializable,Comparable<Class<? extends TraversalStrategy>>,TraversalStrategy<TraversalStrategy.OptimizationStrategy>,TraversalStrategy.OptimizationStrategy
public final class GValueReductionStrategy
extends AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy>
implements TraversalStrategy.OptimizationStrategy
Converts placeholder steps that hold
GValue objects to their concrete implementations. While not an
optimization in and of itself, the GValue functionality in general, provides a mechanism for traversal
optimization so falls in this category. In addition, converting to concrete steps at this stage also allows provider
optimization strategies to execute on concrete steps, rather than step interfaces. Concrete steps are much easier to
reason about and keep strategy application simple for the vast majority of providers.
Providers hoping to do more advanced optimizations that require GValue objects to be present for their
strategies will need to remove GValueReductionStrategy and offer their own mechanism for converting step
placeholders to concrete steps. ProviderGValueReductionStrategy is a base class for helping with this need.- See Also:
-
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>>No TinkerPop optimization strategy should be applied following this one.static GValueReductionStrategyinstance()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
applyPrior, 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
-
applyPost
No TinkerPop optimization strategy should be applied following this one. The default implementation addsGValueReductionStrategyitself so retaining that implementation would create a circular reference so returning an empty list here removes that dependency.- Specified by:
applyPostin interfaceTraversalStrategy<TraversalStrategy.OptimizationStrategy>- Specified by:
applyPostin interfaceTraversalStrategy.OptimizationStrategy- Returns:
- the set of strategies that must be executed post this one
-