Class TraversalStrategies.GlobalCache

java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies.GlobalCache
Enclosing interface:
TraversalStrategies

public static final class TraversalStrategies.GlobalCache extends Object
  • 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 the GLOBAL_REGISTRY such that duplicates will overwrite the previous registration.
    • registerStrategy

      public static void registerStrategy(Class<? extends TraversalStrategy> clazz)
      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

      public static void unregisterStrategy(Class<? extends TraversalStrategy> clazz)
      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

      public static TraversalStrategies getStrategies(Class graphOrGraphComputerClass)