Class TraversalStrategies.GlobalCache
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies.GlobalCache
- Enclosing interface:
- TraversalStrategies
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<? extends Class<? extends TraversalStrategy>>getRegisteredStrategyClass(String strategyName) Looks up a strategy by its simple name.static TraversalStrategiesgetStrategies(Class graphOrGraphComputerClass) static voidregisterStrategies(Class graphOrGraphComputerClass, TraversalStrategies traversalStrategies) Register a set of strategies for a particular graph or graph computer class.static voidregisterStrategy(Class<? extends TraversalStrategy> clazz) Registers a strategy by its simple name, but does not cache an instance of it.static voidunregisterStrategy(Class<? extends TraversalStrategy> clazz) Unregisters a strategy by its simple name.
-
Constructor Details
-
GlobalCache
public GlobalCache()
-
-
Method Details
-
registerStrategies
public static void registerStrategies(Class graphOrGraphComputerClass, TraversalStrategies traversalStrategies) Register a set of strategies for a particular graph or graph computer class. This is typically done by the graph or graph computer class itself when it is loaded. Strategy names should be globally unique and are added to theGLOBAL_REGISTRYsuch that duplicates will overwrite the previous registration. -
registerStrategy
Registers a strategy by its simple name, but does not cache an instance of it. Choose this method if you don't want the strategy to be included as part of the default strategy set, but do want it available to the grammar when parsing Gremlin. -
unregisterStrategy
Unregisters a strategy by its simple name. If the strategy is not in the registry then the grammar cannot reference it which means that it cannot be removed from execution using {GraphTraversalSource.withoutStrategies(Class[])}. -
getRegisteredStrategyClass
public static Optional<? extends Class<? extends TraversalStrategy>> getRegisteredStrategyClass(String strategyName) Looks up a strategy by its simple name. -
getStrategies
-