Package com.arangodb.model
Class GraphCreateOptions
- java.lang.Object
-
- com.arangodb.model.GraphCreateOptions
-
public final class GraphCreateOptions extends Object
- Author:
- Mark Vollmary
- See Also:
- API Documentation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GraphCreateOptions.SmartOptions
-
Constructor Summary
Constructors Constructor Description GraphCreateOptions()
-
Method Summary
-
-
-
Method Detail
-
getName
public String getName()
-
getEdgeDefinitions
public Collection<EdgeDefinition> getEdgeDefinitions()
-
getOrphanCollections
public Collection<String> getOrphanCollections()
-
orphanCollections
public GraphCreateOptions orphanCollections(String... orphanCollections)
- Parameters:
orphanCollections
- Additional vertex collections- Returns:
- options
-
getIsSmart
public Boolean getIsSmart()
-
isSmart
public GraphCreateOptions isSmart(Boolean isSmart)
- Parameters:
isSmart
- Define if the created graph should be smart. This only has effect in Enterprise version.- Returns:
- options
-
getIsDisjoint
public Boolean getIsDisjoint()
-
isDisjoint
public GraphCreateOptions isDisjoint(Boolean isDisjoint)
- Parameters:
isDisjoint
- If set to true, a Disjoint SmartGraph will be created. This flag is not editable after creation. Default: false.- Returns:
- options
- Since:
- ArangoDB 3.7
-
getReplicationFactor
public ReplicationFactor getReplicationFactor()
-
replicationFactor
public GraphCreateOptions replicationFactor(ReplicationFactor replicationFactor)
- Parameters:
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.- Returns:
- options
-
replicationFactor
public GraphCreateOptions replicationFactor(int replicationFactor)
-
getWriteConcern
public Integer getWriteConcern()
-
writeConcern
public GraphCreateOptions writeConcern(Integer writeConcern)
- Parameters:
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)- Returns:
- options
-
getNumberOfShards
public Integer getNumberOfShards()
-
numberOfShards
public GraphCreateOptions numberOfShards(Integer numberOfShards)
- Parameters:
numberOfShards
- The number of shards that is used for every collection within this graph. Cannot be modified later.- Returns:
- options
-
getSmartGraphAttribute
public String getSmartGraphAttribute()
-
smartGraphAttribute
public GraphCreateOptions smartGraphAttribute(String smartGraphAttribute)
- Parameters:
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.- Returns:
- options
-
getSatellites
public Collection<String> getSatellites()
-
satellites
public GraphCreateOptions satellites(String... satellites)
- Parameters:
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.- Returns:
- options
- Since:
- ArangoDB 3.9.0
-
getWaitForSync
public Boolean getWaitForSync()
-
waitForSync
public GraphCreateOptions waitForSync(Boolean waitForSync)
-
getOptions
public GraphCreateOptions.SmartOptions getOptions()
-
-