org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration

## 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 specified `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 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 and Description
    --- | ---
    `static String` | `ID_SEED`

    - ### Fields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy

      `STRATEGY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SeedStrategy(long seed)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `apply(Traversal.Admin<?,?> traversal)`
    `static SeedStrategy` | `create(Configuration configuration)`
    `Configuration` | `getConfiguration()` Get the configuration representation of this strategy.
    `long` | `getSeed()`

    - ### 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.DecorationStrategy

      `compareTo, getTraversalCategory`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy

      `applyPost, applyPrior`

- - ### Field Detail

    - #### ID_SEED

          public static final String ID_SEED

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SeedStrategy

          public SeedStrategy(long seed)

  - ### Method Detail

    - #### getSeed

          public long getSeed()

    - #### apply

          public void apply(Traversal.Admin<?,?> traversal)

      Specified by:
        `apply` in interface `TraversalStrategy<TraversalStrategy.DecorationStrategy>`

    - #### create

          public static SeedStrategy create(Configuration configuration)

    - #### getConfiguration

          public 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<TraversalStrategy.DecorationStrategy>`
      Returns:
        the configuration used to create this strategy

Copyright © 2013–2021 Apache Software Foundation. All rights reserved.