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 Description PartitionStrategycreate()Creates thePartitionStrategy.PartitionStrategy.BuilderincludeMetaProperties(boolean includeMetaProperties)Set totrueif theVertexPropertyinstances should get assigned to partitions.PartitionStrategy.BuilderpartitionKey(String partitionKey)Specifies the partition key name.PartitionStrategy.BuilderreadPartitions(String... readPartitions)Specifies the partition of the graph to read from.PartitionStrategy.BuilderreadPartitions(List<String> readPartitions)Specifies the partition of the graph to read from.PartitionStrategy.BuilderwritePartition(String writePartition)Specifies the name of the partition to write when adding vertices, edges and vertex properties.
-
-
-
Method Detail
-
includeMetaProperties
public PartitionStrategy.Builder includeMetaProperties(boolean includeMetaProperties)
Set totrueif theVertexPropertyinstances should get assigned to partitions. This has the effect of hiding properties within a particular partition so that in order for theVertexPropertyto be seen both the parentVertexand theVertexPropertymust have readable partitions defined in the strategy. When setting this totrue(it isfalseby default) it is important that theGraphsupport 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 thePartitionStrategyto 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 thePartitionStrategy.
-
-