public interface TraversalStrategies extends Serializable, Cloneable
Modifier and Type | Interface and Description |
---|---|
static class |
TraversalStrategies.GlobalCache |
Modifier and Type | Method and Description |
---|---|
TraversalStrategies |
addStrategies(TraversalStrategy... strategies)
Add all the provided
TraversalStrategy instances to the current collection. |
void |
applyStrategies(Traversal.Admin<?,?> traversal)
|
TraversalStrategies |
clone() |
TraverserGeneratorFactory |
getTraverserGeneratorFactory()
Get the
TraverserGeneratorFactory to use to generate traversers. |
TraversalStrategies |
removeStrategies(Class<? extends TraversalStrategy>... strategyClasses)
Remove all the provided
TraversalStrategy classes from the current collection. |
void |
setTraverserGeneratorFactory(TraverserGeneratorFactory traverserGeneratorFactory)
Set the
TraverserGeneratorFactory to use for determining which Traverser type to generate for the Traversal . |
static void |
sortStrategies(List<? extends TraversalStrategy> strategies)
Sorts the list of provided strategies such that the
TraversalStrategy.applyPost()
and TraversalStrategy.applyPrior() dependencies are respected. |
List<TraversalStrategy> |
toList()
Return all the
TraversalStrategy singleton instances associated with this TraversalStrategies . |
List<TraversalStrategy> toList()
TraversalStrategy
singleton instances associated with this TraversalStrategies
.void applyStrategies(Traversal.Admin<?,?> traversal)
TraversalStrategy
optimizers to the Traversal
for the stated TraversalEngine
.
This method must ensure that the strategies are sorted prior to application.traversal
- the traversal to apply the strategies toengine
- the engine that the traversal is going to be executed onTraversalStrategies addStrategies(TraversalStrategy... strategies)
TraversalStrategy
instances to the current collection.
When all the provided strategies have been added, the collection is resorted.strategies
- the traversal strategies to addTraversalStrategies removeStrategies(Class<? extends TraversalStrategy>... strategyClasses)
TraversalStrategy
classes from the current collection.
When all the provided strategies have been removed, the collection is resorted.strategyClasses
- the traversal strategies to remove by their classTraversalStrategies clone()
TraverserGeneratorFactory getTraverserGeneratorFactory()
TraverserGeneratorFactory
to use to generate traversers.void setTraverserGeneratorFactory(TraverserGeneratorFactory traverserGeneratorFactory)
TraverserGeneratorFactory
to use for determining which Traverser
type to generate for the Traversal
.traverserGeneratorFactory
- the factory to usestatic void sortStrategies(List<? extends TraversalStrategy> strategies)
TraversalStrategy.applyPost()
and TraversalStrategy.applyPrior()
dependencies are respected.
Note, that the order may not be unique.strategies
- the traversal strategies to sortCopyright © 2013–2015 Apache Software Foundation. All rights reserved.