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 PartitionStrategy
create()
Creates thePartitionStrategy
.PartitionStrategy.Builder
includeMetaProperties(boolean includeMetaProperties)
Set totrue
if theVertexProperty
instances should get assigned to partitions.PartitionStrategy.Builder
partitionKey(String partitionKey)
Specifies the partition key name.PartitionStrategy.Builder
readPartitions(String... readPartitions)
Specifies the partition of the graph to read from.PartitionStrategy.Builder
readPartitions(List<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.
-
-
-
Method Detail
-
includeMetaProperties
public PartitionStrategy.Builder includeMetaProperties(boolean includeMetaProperties)
Set totrue
if theVertexProperty
instances should get assigned to partitions. This has the effect of hiding properties within a particular partition so that in order for theVertexProperty
to be seen both the parentVertex
and theVertexProperty
must have readable partitions defined in the strategy. When setting this totrue
(it isfalse
by default) it is important that theGraph
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 thePartitionStrategy
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 thePartitionStrategy
.
-
-