public class GraphCreateOptions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GraphCreateOptions.SmartOptions |
Constructor and Description |
---|
GraphCreateOptions() |
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 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 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 Boolean getSatellite()
public GraphCreateOptions satellite(Boolean satellite)
satellite
- If the true the graph is created as a satellite graph. In this case
replicationFactor(Integer)
is ignored.@Deprecated public Integer getMinReplicationFactor()
getWriteConcern()
instead@Deprecated public GraphCreateOptions minReplicationFactor(Integer minReplicationFactor)
writeConcern(Integer)
insteadminReplicationFactor
- (optional, default is 1): in a cluster, this attribute determines how many desired 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 desired k-1 replicas are kept. If in a failover scenario
a shard of a collection has less than minReplicationFactor many insync followers it will go into
"read-only" mode and will reject writes until enough followers are insync again. In more detail:
Having `minReplicationFactor == 1` means as soon as a "master-copy" is available of the data writes
are allowed. Having `minReplicationFactor > 1` requires additional insync copies on follower servers
to allow writes.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.Copyright © 2016–2023 ArangoDB GmbH. All rights reserved.