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 aNoOpBarrierStep
after everyFlatMapStep
if neither path-tracking nor partial path-tracking is required, and the next step is not the traversal's last step or aBarrier
.NoOpBarrierStep
s 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:
- Serialized Form
- 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 Modifier and Type Field Description static String
BARRIER_COPY_LABELS
static String
BARRIER_PLACEHOLDER
protected static int
MAX_BARRIER_SIZE
-
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 LazyBarrierStrategy
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
-
-
-
-
Field Detail
-
BARRIER_PLACEHOLDER
public static final String BARRIER_PLACEHOLDER
-
BARRIER_COPY_LABELS
public static final String BARRIER_COPY_LABELS
-
MAX_BARRIER_SIZE
protected static final int MAX_BARRIER_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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.
-
instance
public static LazyBarrierStrategy instance()
-
-