Class TraversalStrategyProxy<T extends TraversalStrategy>

java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.strategy.TraversalStrategyProxy<T>
All Implemented Interfaces:
Serializable, Comparable, TraversalStrategy

public final class TraversalStrategyProxy<T extends TraversalStrategy> extends Object implements Serializable, TraversalStrategy
This class is for use with GremlinLang and for serialization purposes. It is not meant for direct use with TraversalSource.withStrategies(TraversalStrategy[]).
Author:
Marko A. Rodriguez (http://markorodriguez.com)
See Also:
  • Constructor Details

    • TraversalStrategyProxy

      public TraversalStrategyProxy(String strategyName)
    • TraversalStrategyProxy

      public TraversalStrategyProxy(String strategyName, org.apache.commons.configuration2.Configuration configuration)
    • TraversalStrategyProxy

      public TraversalStrategyProxy(T traversalStrategy)
    • TraversalStrategyProxy

      @Deprecated public TraversalStrategyProxy(Class<T> strategyClass, org.apache.commons.configuration2.Configuration configuration)
      Deprecated.
      This constructor has been deprecated since 4.0.0 as TraversalStrategyProxy is now based around strategy names, instead of strategy classes. Use TraversalStrategyProxy(String, Configuration) instead.
  • Method Details

    • getConfiguration

      public org.apache.commons.configuration2.Configuration getConfiguration()
      Description copied from interface: TraversalStrategy
      Get the configuration representation of this strategy. This is useful for converting a strategy into a serialized form.
      Specified by:
      getConfiguration in interface TraversalStrategy<T extends TraversalStrategy>
      Returns:
      the configuration used to create this strategy
    • getStrategyName

      public String getStrategyName()
    • getStrategyClass

      @Deprecated public Class<T> getStrategyClass()
      Deprecated.
      As of 4.0.0, TraversalStrategyProxy is now based around strategy names, instead of strategy classes. For compatibility, this method will attempt to lookup the strategy name in TraversalStrategies.GlobalCache. Use of getStrategyName() is preferred. If a class object is needed, users should utilize a mapping of strategy name to strategy class which is appropriate for their environment.
    • apply

      public void apply(Traversal.Admin traversal)
      Description copied from interface: TraversalStrategy
      The transformation the strategy applies to the traversal.
      Specified by:
      apply in interface TraversalStrategy<T extends TraversalStrategy>
    • compareTo

      public int compareTo(Object o)
      Specified by:
      compareTo in interface Comparable<T extends TraversalStrategy>
    • toString

      public String toString()
      Overrides:
      toString in class Object