public class SeedStrategy extends AbstractTraversalStrategy<TraversalStrategy.DecorationStrategy> implements TraversalStrategy.DecorationStrategy
seed value for Seedable steps, 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 for g.V() then repeated runs of g.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 of order() in these casesTraversalStrategy.DecorationStrategy, TraversalStrategy.FinalizationStrategy, TraversalStrategy.OptimizationStrategy, TraversalStrategy.ProviderOptimizationStrategy, TraversalStrategy.VerificationStrategy| Modifier and Type | Field and Description |
|---|---|
static String |
ID_SEED |
STRATEGY| Constructor and Description |
|---|
SeedStrategy(long seed) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Traversal.Admin<?,?> traversal) |
static SeedStrategy |
create(org.apache.commons.configuration2.Configuration configuration) |
org.apache.commons.configuration2.Configuration |
getConfiguration()
Get the configuration representation of this strategy.
|
long |
getSeed() |
equals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompareTo, getTraversalCategoryapplyPost, applyPriorpublic static final String ID_SEED
public long getSeed()
public void apply(Traversal.Admin<?,?> traversal)
apply in interface TraversalStrategy<TraversalStrategy.DecorationStrategy>public static SeedStrategy create(org.apache.commons.configuration2.Configuration configuration)
public org.apache.commons.configuration2.Configuration getConfiguration()
TraversalStrategygetConfiguration in interface TraversalStrategy<TraversalStrategy.DecorationStrategy>Copyright © 2013–2022 Apache Software Foundation. All rights reserved.