Class SeedStrategy
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy<TraversalStrategy.DecorationStrategy>
-
- org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategy
-
- All Implemented Interfaces:
Serializable,Comparable<Class<? extends TraversalStrategy>>,TraversalStrategy<TraversalStrategy.DecorationStrategy>,TraversalStrategy.DecorationStrategy
public class SeedStrategy extends AbstractTraversalStrategy<TraversalStrategy.DecorationStrategy> implements TraversalStrategy.DecorationStrategy
A strategy that resets the specifiedseedvalue forSeedablesteps, which in turn will produce deterministic results from those steps. It is important to note that when using this strategy that it only guarantees deterministic results from a step but not from an entire traversal. For example, if a graph does no guarantee iteration order forg.V()then repeated runs ofg.V().coin(0.5)with this strategy will return the same number of results but not necessarily the same ones. The same problem can occur in OLAP-based traversals where iteration order is not explicitly guaranteed. The only way to ensure completely deterministic results in that sense is to apply some form oforder()in these cases- See Also:
- Serialized Form
-
-
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 StringID_SEED-
Fields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy
STRATEGY
-
-
Constructor Summary
Constructors Constructor Description SeedStrategy(long seed)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(Traversal.Admin<?,?> traversal)static SeedStrategycreate(org.apache.commons.configuration2.Configuration configuration)org.apache.commons.configuration2.ConfigurationgetConfiguration()Get the configuration representation of this strategy.longgetSeed()-
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, applyPrior
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy.DecorationStrategy
compareTo, getTraversalCategory
-
-
-
-
Field Detail
-
ID_SEED
public static final String ID_SEED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSeed
public long getSeed()
-
apply
public void apply(Traversal.Admin<?,?> traversal)
- Specified by:
applyin interfaceTraversalStrategy<TraversalStrategy.DecorationStrategy>
-
create
public static SeedStrategy create(org.apache.commons.configuration2.Configuration configuration)
-
getConfiguration
public org.apache.commons.configuration2.Configuration getConfiguration()
Description copied from interface:TraversalStrategyGet the configuration representation of this strategy. This is useful for converting a strategy into a serialized form.- Specified by:
getConfigurationin interfaceTraversalStrategy<TraversalStrategy.DecorationStrategy>- Returns:
- the configuration used to create this strategy
-
-