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 aTraversal
from "seeing" specified areas of the graph given the partition names assigned toPartitionStrategy.Builder.readPartitions(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 Description static class
PartitionStrategy.Builder
class
PartitionStrategy.MapPropertiesConverter
class
PartitionStrategy.MapPropertiesFilter
Takes the result of aMap
containingProperty
lists and if the property is aVertexProperty
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 toGraphTraversal.valueMap(java.lang.String...)
.class
PartitionStrategy.TypeChecker<A>
-
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 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 Description void
apply(Traversal.Admin<?,?> traversal)
static PartitionStrategy.Builder
build()
static PartitionStrategy
create(org.apache.commons.configuration2.Configuration configuration)
org.apache.commons.configuration2.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
applyPost, applyPrior
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy.DecorationStrategy
compareTo, getTraversalCategory
-
-
-
-
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()
-
isIncludeMetaProperties
public boolean isIncludeMetaProperties()
-
build
public static PartitionStrategy.Builder build()
-
apply
public void apply(Traversal.Admin<?,?> traversal)
- Specified by:
apply
in interfaceTraversalStrategy<TraversalStrategy.DecorationStrategy>
-
getConfiguration
public org.apache.commons.configuration2.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 interfaceTraversalStrategy<TraversalStrategy.DecorationStrategy>
- Returns:
- the configuration used to create this strategy
-
create
public static PartitionStrategy create(org.apache.commons.configuration2.Configuration configuration)
-
-