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

## Class PartitionStrategy.Builder

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy.Builder

- Enclosing class:
    PartitionStrategy

      public static final class PartitionStrategy.Builder
      extends Object

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PartitionStrategy` | `create()` Creates the `PartitionStrategy`.
    `PartitionStrategy.Builder` | `includeMetaProperties(boolean includeMetaProperties)` Set to `true` if the `VertexProperty` instances should get assigned to partitions.
    `PartitionStrategy.Builder` | `partitionKey(String partitionKey)` Specifies the partition key name.
    `PartitionStrategy.Builder` | `readPartitions(List<String> readPartitions)` Specifies the partition of the graph to read from.
    `PartitionStrategy.Builder` | `readPartitions(String... readPartitions)` Specifies the partition of the graph to read from.
    `PartitionStrategy.Builder` | `writePartition(String writePartition)` Specifies the name of the partition to write when adding vertices, edges and vertex properties.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### includeMetaProperties

          public PartitionStrategy.Builder includeMetaProperties(boolean includeMetaProperties)

      Set to `true` if the `VertexProperty` instances should get assigned to partitions. This has the effect of hiding properties within a particular partition so that in order for the `VertexProperty` to be seen both the parent `Vertex` and the `VertexProperty` must have readable partitions defined in the strategy.

      When setting this to `true` (it is `false` by default) it is important that the `Graph` support the meta-properties feature. If it does not errors will ensue.

    - #### writePartition

          public PartitionStrategy.Builder writePartition(String writePartition)

      Specifies the name of the partition to write when adding vertices, edges and vertex properties. This name can be any user defined value. It is only possible to write to a single partition at a time.

    - #### partitionKey

          public PartitionStrategy.Builder partitionKey(String partitionKey)

      Specifies the partition key name. This is the property key that contains the partition value. It may a good choice to index on this key in certain cases (in graphs that support such things). This value must be specified for the `PartitionStrategy` to be constructed properly.

    - #### readPartitions

          public PartitionStrategy.Builder readPartitions(List<String> readPartitions)

      Specifies the partition of the graph to read from. It is possible to assign multiple partition keys so as to read from multiple partitions at the same time.

    - #### readPartitions

          public PartitionStrategy.Builder readPartitions(String... readPartitions)

      Specifies the partition of the graph to read from. It is possible to assign multiple partition keys so as to read from multiple partitions at the same time.

    - #### create

          public PartitionStrategy create()

      Creates the `PartitionStrategy`.

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