public final class GraphCreateOptions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GraphCreateOptions.SmartOptions |
Constructor and Description |
---|
GraphCreateOptions() |
Modifier and Type | Method and Description |
---|---|
Collection<EdgeDefinition> |
getEdgeDefinitions() |
Boolean |
getIsDisjoint() |
Boolean |
getIsSmart() |
String |
getName() |
Integer |
getNumberOfShards() |
GraphCreateOptions.SmartOptions |
getOptions() |
Collection<String> |
getOrphanCollections() |
ReplicationFactor |
getReplicationFactor() |
Collection<String> |
getSatellites() |
String |
getSmartGraphAttribute() |
Integer |
getWriteConcern() |
GraphCreateOptions |
isDisjoint(Boolean isDisjoint) |
GraphCreateOptions |
isSmart(Boolean isSmart) |
GraphCreateOptions |
numberOfShards(Integer numberOfShards) |
GraphCreateOptions |
orphanCollections(String... orphanCollections) |
GraphCreateOptions |
replicationFactor(int replicationFactor) |
GraphCreateOptions |
replicationFactor(ReplicationFactor replicationFactor) |
GraphCreateOptions |
satellites(String... satellites) |
GraphCreateOptions |
smartGraphAttribute(String smartGraphAttribute) |
GraphCreateOptions |
writeConcern(Integer writeConcern) |
public String getName()
public Collection<EdgeDefinition> getEdgeDefinitions()
public 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 Boolean getIsDisjoint()
public GraphCreateOptions isDisjoint(Boolean isDisjoint)
isDisjoint
- If set to true, a Disjoint SmartGraph will be created. This flag is not editable after
creation. Default: false.public ReplicationFactor getReplicationFactor()
public GraphCreateOptions replicationFactor(ReplicationFactor 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 GraphCreateOptions replicationFactor(int replicationFactor)
public Integer getWriteConcern()
public GraphCreateOptions writeConcern(Integer writeConcern)
writeConcern
- Write concern for new collections in the graph.
It determines how many copies of each shard are required to be in sync on the different
DB-Servers. If there are less then these many copies in the cluster a shard will refuse to
write. Writes to shards with enough up-to-date copies will succeed at the same time however.
The value of writeConcern can not be larger than replicationFactor. (cluster only)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.public Collection<String> getSatellites()
public GraphCreateOptions satellites(String... satellites)
satellites
- collection names that will be used to create SatelliteCollections
for a Hybrid (Disjoint) SmartGraph (Enterprise Edition only). Each array element
must be a valid collection name. The collection type cannot be modified later.public GraphCreateOptions.SmartOptions getOptions()
Copyright © 2016–2023 ArangoDB GmbH. All rights reserved.