public class GraphCreateOptions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GraphCreateOptions.SmartOptions |
Constructor and Description |
---|
GraphCreateOptions() |
Modifier and Type | Method and Description |
---|---|
protected GraphCreateOptions |
edgeDefinitions(Collection<EdgeDefinition> edgeDefinitions) |
Collection<EdgeDefinition> |
getEdgeDefinitions() |
Boolean |
getIsSmart() |
protected String |
getName() |
Integer |
getNumberOfShards() |
Collection<String> |
getOrphanCollections() |
Integer |
getReplicationFactor() |
String |
getSmartGraphAttribute() |
GraphCreateOptions |
isSmart(Boolean isSmart) |
protected GraphCreateOptions |
name(String name) |
GraphCreateOptions |
numberOfShards(Integer numberOfShards) |
GraphCreateOptions |
orphanCollections(String... orphanCollections) |
GraphCreateOptions |
replicationFactor(Integer replicationFactor) |
GraphCreateOptions |
smartGraphAttribute(String smartGraphAttribute) |
protected String getName()
protected GraphCreateOptions name(String name)
name
- Name of the graphpublic Collection<EdgeDefinition> getEdgeDefinitions()
protected GraphCreateOptions edgeDefinitions(Collection<EdgeDefinition> edgeDefinitions)
edgeDefinitions
- An array of definitions for the edgepublic Collection<String> getOrphanCollections()
public GraphCreateOptions orphanCollections(String... orphanCollections)
orphanCollections
- Additional vertex collectionspublic Boolean getIsSmart()
public GraphCreateOptions isSmart(Boolean isSmart)
isSmart
- Define if the created graph should be smart. This only has effect in Enterprise version.public Integer getReplicationFactor()
public GraphCreateOptions replicationFactor(Integer replicationFactor)
replicationFactor
- (The default is 1): in a cluster, this attribute determines how many copies of each shard are kept on
different DBServers. The value 1 means that only one copy (no synchronous replication) is kept. A
value of k means that k-1 replicas are kept. Any two copies reside on different DBServers. Replication
between them is synchronous, that is, every write operation to the "leader" copy will be replicated to
all "follower" replicas, before the write operation is reported successful. If a server fails, this is
detected automatically and one of the servers holding copies take over, usually without an error being
reported.public Integer getNumberOfShards()
public GraphCreateOptions numberOfShards(Integer numberOfShards)
numberOfShards
- The number of shards that is used for every collection within this graph. Cannot be modified later.public String getSmartGraphAttribute()
public GraphCreateOptions smartGraphAttribute(String smartGraphAttribute)
smartGraphAttribute
- The attribute name that is used to smartly shard the vertices of a graph. Every vertex in this Graph
has to have this attribute. Cannot be modified later.Copyright © 2016–2017 ArangoDB GmbH. All rights reserved.