Class LazyBarrierStrategy
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy>
org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy
- All Implemented Interfaces:
Serializable,Comparable<Class<? extends TraversalStrategy>>,TraversalStrategy<TraversalStrategy.OptimizationStrategy>,TraversalStrategy.OptimizationStrategy
public final class LazyBarrierStrategy
extends AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy>
implements TraversalStrategy.OptimizationStrategy
LazyBarrierStrategy is an OLTP-only strategy that automatically inserts a NoOpBarrierStep after every
FlatMapStep if neither path-tracking nor partial path-tracking is required, and the next step is not the
traversal's last step or a Barrier. NoOpBarrierSteps allow traversers to be bulked, thus this strategy
is meant to reduce memory requirements and improve the overall query performance.- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
- Example:
__.out().bothE().count() // is replaced by __.out().barrier(2500).bothE().count() __.both().both().valueMap() // is replaced by __.both().barrier(2500).both().barrier(2500).valueMap()
-
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(Traversal.Admin<?, ?> traversal) The transformation the strategy applies to the traversal.Set<Class<? extends TraversalStrategy.OptimizationStrategy>>The set of strategies that must be executed before this strategy is executed.static LazyBarrierStrategyinstance()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
applyPost, compareTo, getTraversalCategory
-
Field Details
-
BARRIER_PLACEHOLDER
-
BARRIER_COPY_LABELS
-
MAX_BARRIER_SIZE
protected static final int MAX_BARRIER_SIZE- See Also:
-
-
Method Details
-
apply
Description copied from interface:TraversalStrategyThe transformation the strategy applies to the traversal.- Specified by:
applyin interfaceTraversalStrategy<TraversalStrategy.OptimizationStrategy>
-
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.
-
instance
-