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

## Class PartitionStrategy

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy<TraversalStrategy.DecorationStrategy>
  - - org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy

- All Implemented Interfaces:
    Serializable, Comparable<Class<? extends TraversalStrategy>>, TraversalStrategy<TraversalStrategy.DecorationStrategy>, TraversalStrategy.DecorationStrategy

      public final class PartitionStrategy
      extends AbstractTraversalStrategy<TraversalStrategy.DecorationStrategy>
      implements TraversalStrategy.DecorationStrategy

  `PartitionStrategy` partitions the vertices, edges and vertex properties of a graph into String named partitions (i.e. buckets, subgraphs, etc.). It blinds a `Traversal` from "seeing" specified areas of the graph given the partition names assigned to `PartitionStrategy.Builder.addReadPartition(String)`. The traversal will ignore all graph elements not in those "read" partitions.
  Author:
    Stephen Mallette (http://stephen.genoprime.com), Marko A. Rodriguez (http://markorodriguez.com)
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PartitionStrategy.Builder`
    `class` | `PartitionStrategy.MapPropertiesConverter` Takes a `Map` of a `List` of `Property` objects and unwraps the `Property.value()`.
    `class` | `PartitionStrategy.MapPropertiesFilter` Takes the result of a `Map` containing `Property` lists and if the property is a `VertexProperty` it applies a filter based on the current partitioning.
    `class` | `PartitionStrategy.PartitionKeyHider<A extends Property>` A concrete lambda implementation that filters out the partition key so that it isn't visible when making calls to `GraphTraversal.valueMap(java.lang.String...)`.
    `class` | `PartitionStrategy.TypeChecker<A>` A concrete lambda implementation that checks if the type passing through on the `Traverser` is of a specific `Element` type.

    - ### 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` | `INCLUDE_META_PROPERTIES`
    `static String` | `PARTITION_KEY`
    `static String` | `READ_PARTITIONS`
    `static String` | `WRITE_PARTITION`

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

      `STRATEGY`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `apply(Traversal.Admin<?,?> traversal)`
    `static PartitionStrategy.Builder` | `build()`
    `static PartitionStrategy` | `create(Configuration configuration)`
    `Configuration` | `getConfiguration()` Get the configuration representation of this strategy.
    `String` | `getPartitionKey()`
    `Set<String>` | `getReadPartitions()`
    `String` | `getWritePartition()`
    `boolean` | `isIncludeMetaProperties()`

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

    - #### INCLUDE_META_PROPERTIES

          public static final String INCLUDE_META_PROPERTIES

      See Also:
        Constant Field Values

    - #### WRITE_PARTITION

          public static final String WRITE_PARTITION

      See Also:
        Constant Field Values

    - #### PARTITION_KEY

          public static final String PARTITION_KEY

      See Also:
        Constant Field Values

    - #### READ_PARTITIONS

          public static final String READ_PARTITIONS

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getWritePartition

          public String getWritePartition()

    - #### getPartitionKey

          public String getPartitionKey()

    - #### getReadPartitions

          public Set<String> getReadPartitions()

    - #### isIncludeMetaProperties

          public boolean isIncludeMetaProperties()

    - #### build

          public static PartitionStrategy.Builder build()

    - #### apply

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

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

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

    - #### create

          public static PartitionStrategy create(Configuration configuration)

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