mirror of https://gitee.com/bigwinds/arangodb
Some changes in the documentation code for gitbook
This commit is contained in:
parent
6799432577
commit
52ad8fc702
|
@ -20,130 +20,34 @@ are also used during the planning to find free network ports.
|
|||
|
||||
Here are the details of the functionality:
|
||||
|
||||
`new require("org/arangodb/cluster").Planner(userConfig)`
|
||||
!SUBSECTION Require
|
||||
<!-- js/server/modules/org/arangodb/cluster/planner.js -->
|
||||
@startDocuBlock JSF_Cluster_Planner_Constructor
|
||||
|
||||
This constructor builds a cluster planner object. The one and only argument is an object that can have the properties described below. The planner can plan clusters on a single machine (basically for testing purposes) and on multiple machines. The resulting "cluster plans" can be used by the kickstarter (see JSF_Cluster_Kickstarter_Constructor) to start up the processes comprising the cluster, including the agency. To this end, there has to be one dispatcher on every machine participating in the cluster. A dispatcher is a simple instance of ArangoDB, compiled with the cluster extensions, but not running in cluster mode. This is why the configuration option dispatchers below is of central importance.
|
||||
!SUBSECTION Get Plan
|
||||
<!-- js/server/modules/org/arangodb/cluster/planner.js -->
|
||||
@startDocuBlock JSF_Planner_prototype_getPlan
|
||||
|
||||
* dispatchers: an object with a property for each dispatcher, the property name is the ID of the dispatcher and the value should be an object with at least the property endpoint containing the endpoint of the corresponding dispatcher. Further optional properties are:
|
||||
* avoidPorts which is an object in which all port numbers that should not be used are bound to true, default is empty, that is, all ports can be used
|
||||
* arangodExtraArgs, which is a list of additional command line arguments that will be given to DBservers and coordinators started by this dispatcher, the default is an empty list. These arguments will be appended to those produced automatically, such that one can overwrite things with this.
|
||||
* allowCoordinators, which is a boolean value indicating whether or not coordinators should be started on this dispatcher, the default is true
|
||||
* allowDBservers, which is a boolean value indicating whether or not DBservers should be started on this dispatcher, the default is true
|
||||
* allowAgents, which is a boolean value indicating whether or not agents should be started on this dispatcher, the default is true
|
||||
* username, which is a string that contains the user name for authentication with this dispatcher
|
||||
* passwd, which is a string that contains the password for authentication with this dispatcher, if not both username and passwd are set, then no authentication is used between dispatchers. Note that this will not work if the dispatchers are configured with authentication.
|
||||
* If .dispatchers is empty (no property), then an entry for the local arangod itself is automatically added. Note that if the only configured dispatcher has endpoint tcp://localhost:, all processes are started in a special "local" mode and are configured to bind their endpoints only to the localhost device. In all other cases both agents and arangod instances bind their endpoints to all available network devices.
|
||||
* numberOfAgents: the number of agents in the agency, usually there is no reason to deviate from the default of 3. The planner distributes them amongst the dispatchers, if possible.
|
||||
* agencyPrefix: a string that is used as prefix for all keys of configuration data stored in the agency.
|
||||
* numberOfDBservers: the number of DBservers in the cluster. The planner distributes them evenly amongst the dispatchers.
|
||||
* startSecondaries: a boolean flag indicating whether or not secondary servers are started. In this version, this flag is silently ignored, since we do not yet have secondary servers.
|
||||
* numberOfCoordinators: the number of coordinators in the cluster, the planner distributes them evenly amongst the dispatchers.
|
||||
* DBserverIDs: a list of DBserver IDs (strings). If the planner runs out of IDs it creates its own ones using DBserver concatenated with a unique number.
|
||||
* coordinatorIDs: a list of coordinator IDs (strings). If the planner runs out of IDs it creates its own ones using Coordinator concatenated with a unique number.
|
||||
* dataPath: this is a string and describes the path under which the agents, the DBservers and the coordinators store their data directories. This can either be an absolute path (in which case all machines in the clusters must use the same path), or it can be a relative path. In the latter case it is relative to the directory that is configured in the dispatcher with the cluster.data-path option (command line or configuration file). The directories created will be called data-PREFIX-ID where PREFIX is replaced with the agency prefix (see above) and ID is the ID of the DBserver or coordinator.
|
||||
* logPath: this is a string and describes the path under which the DBservers and the coordinators store their log file. This can either be an absolute path (in which case all machines in the cluster must use the same path), or it can be a relative path. In the latter case it is relative to the directory that is configured in the dispatcher with the cluster.log-path option.
|
||||
* arangodPath: this is a string and describes the path to the actual executable arangod that will be started for the DBservers and coordinators. If this is an absolute path, it obviously has to be the same on all machines in the cluster as described for dataPath. If it is an empty string, the dispatcher uses the executable that is configured with the cluster.arangod-path option, which is by default the same executable as the dispatcher uses.
|
||||
* agentPath: this is a string and describes the path to the actual executable that will be started for the agents in the agency. If this is an absolute path, it obviously has to be the same on all machines in the cluster, as described for arangodPath. If it is an empty string, the dispatcher uses its cluster.agent-path option.
|
||||
* agentExtPorts: a list of port numbers to use for the external ports of the agents. When running out of numbers in this list, the planner increments the last one used by one for every port needed. Note that the planner checks availability of the ports during the planning phase by contacting the dispatchers on the different machines, and uses only ports that are free during the planning phase. Obviously, if those ports are connected before the actual startup, things can go wrong.
|
||||
* agentIntPorts: a list of port numbers to use for the internal ports of the agents. The same comments as for agentExtPorts apply.
|
||||
* DBserverPorts: a list of port numbers to use for the DBservers. The same comments as for agentExtPorts apply.
|
||||
* coordinatorPorts: a list of port numbers to use for the coordinators. The same comments as for agentExtPorts apply.
|
||||
* useSSLonDBservers: a boolean flag indicating whether or not we use SSL on all DBservers in the cluster
|
||||
* useSSLonCoordinators: a boolean falg indicating whether or not we use SSL on all coordinators in the cluster
|
||||
!SUBSECTION Require
|
||||
<!-- js/server/modules/org/arangodb/cluster/kickstarter.js -->
|
||||
@startDocuBlock JSF_Cluster_Kickstarter_Constructor
|
||||
|
||||
All these values have default values. Here is the current set of default values:
|
||||
!SUBSECTION Launch
|
||||
<!-- js/server/modules/org/arangodb/cluster/kickstarter.js -->
|
||||
@startDocuBlock JSF_Kickstarter_prototype_launch
|
||||
|
||||
{
|
||||
"agencyPrefix" : "arango",
|
||||
"numberOfAgents" : 1,
|
||||
"numberOfDBservers" : 2,
|
||||
"startSecondaries" : false,
|
||||
"numberOfCoordinators" : 1,
|
||||
"DBserverIDs" : ["Pavel", "Perry", "Pancho", "Paul", "Pierre",
|
||||
"Pit", "Pia", "Pablo" ],
|
||||
"coordinatorIDs" : ["Claus", "Chantalle", "Claire", "Claudia",
|
||||
"Claas", "Clemens", "Chris" ],
|
||||
"dataPath" : "", // means configured in dispatcher
|
||||
"logPath" : "", // means configured in dispatcher
|
||||
"arangodPath" : "", // means configured as dispatcher
|
||||
"agentPath" : "", // means configured in dispatcher
|
||||
"agentExtPorts" : [4001],
|
||||
"agentIntPorts" : [7001],
|
||||
"DBserverPorts" : [8629],
|
||||
"coordinatorPorts" : [8530],
|
||||
"dispatchers" : {"me": {"endpoint": "tcp://localhost:"}},
|
||||
// this means only we as a local instance
|
||||
"useSSLonDBservers" : false,
|
||||
"useSSLonCoordinators" : false
|
||||
};
|
||||
!SUBSECTION Shutdown
|
||||
<!-- js/server/modules/org/arangodb/cluster/kickstarter.js -->
|
||||
@startDocuBlock JSF_Kickstarter_prototype_shutdown
|
||||
|
||||
`Planner.getPlan()`
|
||||
!SUBSECTION Relaunch
|
||||
<!-- js/server/modules/org/arangodb/cluster/kickstarter.js -->
|
||||
@startDocuBlock JSF_Kickstarter_prototype_relaunch
|
||||
|
||||
returns the cluster plan as a JavaScript object. The result of this method can be given to the constructor of a Kickstarter.
|
||||
!SUBSECTION Upgrade
|
||||
<!-- js/server/modules/org/arangodb/cluster/kickstarter.js -->
|
||||
@startDocuBlock JSF_Kickstarter_prototype_upgrade
|
||||
|
||||
`new require("org/arangodb/cluster").Kickstarter(plan)`
|
||||
|
||||
This constructor constructs a kickstarter object. Its first argument is a cluster plan as for example provided by the planner. The second argument is optional and is taken to be "me" if omitted, it is the ID of the dispatcher this object should consider itself to be. If the plan contains startup commands for the dispatcher with this ID, these commands are executed immediately. Otherwise they are handed over to another responsible dispatcher via a REST call.
|
||||
|
||||
The resulting object of this constructors allows to launch, shutdown, relaunch the cluster described in the plan.
|
||||
|
||||
|
||||
`Kickstarter.launch()`
|
||||
|
||||
This starts up a cluster as described in the plan which was given to the constructor. To this end, other dispatchers are contacted as necessary. All startup commands for the local dispatcher are executed immediately.
|
||||
|
||||
The result is an object that contains information about the started processes, this object is also stored in the Kickstarter object itself. We do not go into details here about the data structure, but the most important information are the process IDs of the started processes. The corresponding shutdown method (see JSF_Kickstarter_prototype_shutdown) needs this information to shut down all processes.
|
||||
|
||||
Note that all data in the DBservers and all log files and all agency information in the cluster is deleted by this call. This is because it is intended to set up a cluster for the first time. See the relaunch method (see JSF_Kickstarter_prototype_relaunch) for restarting a cluster without data loss.
|
||||
|
||||
`Kickstarter.shutdown()`
|
||||
|
||||
This shuts down a cluster as described in the plan which was given to the constructor. To this end, other dispatchers are contacted as necessary. All processes in the cluster are gracefully shut down in the right order.
|
||||
|
||||
`Kickstarter.relaunch()`
|
||||
|
||||
This starts up a cluster as described in the plan which was given to the constructor. To this end, other dispatchers are contacted as necessary. All startup commands for the local dispatcher are executed immediately.
|
||||
|
||||
The result is an object that contains information about the started processes, this object is also stored in the Kickstarter object itself. We do not go into details here about the data structure, but the most important information are the process IDs of the started processes. The corresponding shutdown method (see JSF_Kickstarter_prototype_shutdown) needs this information to shut down all processes.
|
||||
|
||||
Note that this methods needs that all data in the DBservers and the agency information in the cluster are already set up properly. See the launch method (see JSF_Kickstarter_prototype_launch) for starting a cluster for the first time.
|
||||
|
||||
`Kickstarter.upgrade()`
|
||||
|
||||
This performs an upgrade procedure on a cluster as described in the plan which was given to the constructor. To this end, other dispatchers are contacted as necessary. All commands for the local dispatcher are executed immediately. The basic approach for the upgrade is as follows: The agency is started first (exactly as in relaunch), no configuration is sent there (exactly as in the relaunch action), all servers are first started with the option "–upgrade" and then normally. In the end, the version-check.js script is run on one of the coordinators, as in the launch action.
|
||||
|
||||
The result is an object that contains information about the started processes, this object is also stored in the Kickstarter object itself. We do not go into details here about the data structure, but the most important information are the process IDs of the started processes. The corresponding shutdown method (see JSF_Kickstarter_prototype_shutdown) needs this information to shut down all processes.
|
||||
|
||||
Note that this methods needs that all data in the DBservers and the agency information in the cluster are already set up properly. See the launch method (see JSF_Kickstarter_prototype_launch) for starting a cluster for the first time.
|
||||
|
||||
|
||||
`Kickstarter.cleanup()`
|
||||
|
||||
This cleans up all the data and logs of a previously shut down cluster. To this end, other dispatchers are contacted as necessary. Use shutdown (see JSF_Kickstarter_prototype_shutdown) first and use with caution, since potentially a lot of data is being erased with this call!
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
@anchor JSModuleClusterPlannerConstructor
|
||||
@copydetails JSF_Cluster_Planner_Constructor
|
||||
|
||||
@anchor JSModuleClusterPlannerGetPlan
|
||||
@copydetails JSF_Planner_prototype_getPlan
|
||||
|
||||
@anchor JSModuleClusterKickstarterConstructor
|
||||
@copydetails JSF_Cluster_Kickstarter_Constructor
|
||||
|
||||
@anchor JSModuleClusterKickstarterLaunch
|
||||
@copydetails JSF_Kickstarter_prototype_launch
|
||||
|
||||
@anchor JSModuleClusterKickstarterShutdown
|
||||
@copydetails JSF_Kickstarter_prototype_shutdown
|
||||
|
||||
@anchor JSModuleClusterKickstarterRelaunch
|
||||
@copydetails JSF_Kickstarter_prototype_relaunch
|
||||
|
||||
@anchor JSModuleClusterKickstarterCleanup
|
||||
@copydetails JSF_Kickstarter_prototype_cleanup
|
||||
|
||||
@BNAVIGATE_JSModuleCluster
|
||||
-->
|
||||
!SUBSECTION Cleanup
|
||||
<!-- js/server/modules/org/arangodb/cluster/kickstarter.js -->
|
||||
@startDocuBlock JSF_Kickstarter_prototype_cleanup
|
|
@ -258,15 +258,16 @@ Edge = function (graph, properties) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns the identifier of an edge
|
||||
/// @startDocuBlock edgeGetId
|
||||
///
|
||||
/// @FUN{@FA{edge}.getId()}
|
||||
/// `edge.getId()`
|
||||
///
|
||||
/// Returns the identifier of the @FA{edge}.
|
||||
/// Returns the identifier of the *edge*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-edge-get-id
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Edge.prototype.getId = function () {
|
||||
|
@ -274,15 +275,16 @@ Edge.prototype.getId = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief label of an edge
|
||||
/// @startDocuBlock edgeGetLabel
|
||||
///
|
||||
/// @FUN{@FA{edge}.getLabel()}
|
||||
/// `edge.getLabel()`
|
||||
///
|
||||
/// Returns the label of the @FA{edge}.
|
||||
/// Returns the label of the *edge*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-edge-get-label
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Edge.prototype.getLabel = function () {
|
||||
|
@ -290,15 +292,16 @@ Edge.prototype.getLabel = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns a property of an edge
|
||||
/// @startDocuBlock edgeGetProperty
|
||||
///
|
||||
/// @FUN{@FA{edge}.getProperty(@FA{name})}
|
||||
/// `edge.getProperty(edge)`
|
||||
///
|
||||
/// Returns the property @FA{name} an @FA{edge}.
|
||||
/// Returns the property *edge* an *edge*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-edge-get-property
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Edge.prototype.getProperty = function (name) {
|
||||
|
@ -306,15 +309,16 @@ Edge.prototype.getProperty = function (name) {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief gets all property names of an edge
|
||||
/// @startDocuBlock edgeGetPropertyKeys
|
||||
///
|
||||
/// @FUN{@FA{edge}.getPropertyKeys()}
|
||||
/// `edge.getPropertyKeys()`
|
||||
///
|
||||
/// Returns all propety names an @FA{edge}.
|
||||
/// Returns all propety names an *edge*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-edge-get-property-keys
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Edge.prototype.getPropertyKeys = function () {
|
||||
|
@ -322,15 +326,16 @@ Edge.prototype.getPropertyKeys = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns all properties of an edge
|
||||
/// @startDocuBlock edgeProperties
|
||||
///
|
||||
/// @FUN{@FA{edge}.properties()}
|
||||
/// `edge.properties()`
|
||||
///
|
||||
/// Returns all properties and their values of an @FA{edge}
|
||||
/// Returns all properties and their values of an *edge*
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-edge-properties
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Edge.prototype.properties = function () {
|
||||
|
@ -338,15 +343,16 @@ Edge.prototype.properties = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns the to vertex
|
||||
/// @startDocuBlock edgeGetInVertex
|
||||
///
|
||||
/// @FUN{@FA{edge}.getInVertex()}
|
||||
/// `edge.getInVertex()`
|
||||
///
|
||||
/// Returns the vertex at the head of the @FA{edge}.
|
||||
/// Returns the vertex at the head of the *edge*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-edge-get-in-vertex
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Edge.prototype.getInVertex = function () {
|
||||
|
@ -354,15 +360,16 @@ Edge.prototype.getInVertex = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns the from vertex
|
||||
/// @startDocuBlock edgeGetOutVertex
|
||||
///
|
||||
/// @FUN{@FA{edge}.getOutVertex()}
|
||||
/// `edge.getOutVertex()`
|
||||
///
|
||||
/// Returns the vertex at the tail of the @FA{edge}.
|
||||
/// Returns the vertex at the tail of the *edge*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-edge-get-out-vertex
|
||||
/// @startDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Edge.prototype.getOutVertex = function () {
|
||||
|
@ -370,27 +377,26 @@ Edge.prototype.getOutVertex = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns the other vertex
|
||||
/// @startDocuBlock edgeGetPeerVertex
|
||||
///
|
||||
/// @FUN{@FA{edge}.getPeerVertex(@FA{vertex})}
|
||||
/// `edge*.getPeerVertex(vertex)`
|
||||
///
|
||||
/// Returns the peer vertex of the @FA{edge} and the @FA{vertex}.
|
||||
/// Returns the peer vertex of the *edge* and the *vertex*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @code
|
||||
/// arango> v1 = g.addVertex("1");
|
||||
/// Vertex("1")
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{edgeGetPeerVertex}
|
||||
/// ~ db._create("example");
|
||||
/// v1 = example.addVertex("1");
|
||||
///
|
||||
/// arango> v2 = g.addVertex("2");
|
||||
/// Vertex("2")
|
||||
/// v2 = g.addVertex("2");
|
||||
///
|
||||
/// arango> e = g.addEdge(v1, v2, "1->2", "knows");
|
||||
/// Edge("1->2")
|
||||
/// e = g.addEdge(v1, v2, "1->2", "knows");
|
||||
///
|
||||
/// arango> e.getPeerVertex(v1);
|
||||
/// Vertex(2)
|
||||
/// @endcode
|
||||
/// e.getPeerVertex(v1);
|
||||
/// ~ db._drop("example");
|
||||
/// @END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Edge.prototype.getPeerVertex = function (vertex) {
|
||||
|
@ -463,28 +469,29 @@ Vertex = function (graph, properties) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief adds an inbound edge
|
||||
/// @startDocuBlock vertexAddInEdge
|
||||
///
|
||||
/// @FUN{@FA{vertex}.addInEdge(@FA{peer}, @FA{id})}
|
||||
/// `vertex.addInEdge(peer, id)`
|
||||
///
|
||||
/// Creates a new edge from @FA{peer} to @FA{vertex} and returns the edge
|
||||
/// object. The identifier @FA{id} must be a unique identifier or null.
|
||||
/// Creates a new edge from *peer* to *peer* and returns the edge
|
||||
/// object. The identifier *peer* must be a unique identifier or null.
|
||||
///
|
||||
/// @FUN{@FA{vertex}.addInEdge(@FA{peer}, @FA{id}, @FA{label})}
|
||||
/// `peer.addInEdge(peer, peer, label)`
|
||||
///
|
||||
/// Creates a new edge from @FA{peer} to @FA{vertex} with given label and
|
||||
/// Creates a new edge from *peer* to *peer* with given label and
|
||||
/// returns the edge object.
|
||||
///
|
||||
/// @FUN{@FA{vertex}.addInEdge(@FA{peer}, @FA{id}, @FA{label}, @FA{data})}
|
||||
/// `peer.addInEdge(peer, peer, label, peer)`
|
||||
///
|
||||
/// Creates a new edge from @FA{peer} to @FA{vertex} with given label and
|
||||
/// properties defined in @FA{data}. Returns the edge object.
|
||||
/// Creates a new edge from *peer* to *peer* with given label and
|
||||
/// properties defined in *peer*. Returns the edge object.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-add-in-edge
|
||||
///
|
||||
/// @verbinclude graph-vertex-add-in-edge2
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.addInEdge = function (out, id, label, data) {
|
||||
|
@ -492,30 +499,31 @@ Vertex.prototype.addInEdge = function (out, id, label, data) {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief adds an outbound edge
|
||||
/// @startDocuBlock peerAddOutEdge
|
||||
///
|
||||
/// @FUN{@FA{vertex}.addOutEdge(@FA{peer})}
|
||||
/// `peer.addOutEdge(peer)`
|
||||
///
|
||||
/// Creates a new edge from @FA{vertex} to @FA{peer} and returns the edge
|
||||
/// Creates a new edge from *peer* to *peer* and returns the edge
|
||||
/// object.
|
||||
///
|
||||
/// @FUN{@FA{vertex}.addOutEdge(@FA{peer}, @FA{label})}
|
||||
/// `peer.addOutEdge(peer, label)`
|
||||
///
|
||||
/// Creates a new edge from @FA{vertex} to @FA{peer} with given @FA{label} and
|
||||
/// Creates a new edge from *peer* to *peer* with given *label* and
|
||||
/// returns the edge object.
|
||||
///
|
||||
/// @FUN{@FA{vertex}.addOutEdge(@FA{peer}, @FA{label}, @FA{data})}
|
||||
/// `peer.addOutEdge(peer, label, peer)`
|
||||
///
|
||||
/// Creates a new edge from @FA{vertex} to @FA{peer} with given @FA{label} and
|
||||
/// properties defined in @FA{data}. Returns the edge object.
|
||||
/// Creates a new edge from *peer* to *peer* with given *label* and
|
||||
/// properties defined in *peer*. Returns the edge object.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-add-out-edge
|
||||
///
|
||||
/// @verbinclude graph-vertex-add-out-edge2
|
||||
///
|
||||
/// @verbinclude graph-vertex-add-out-edge3
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.addOutEdge = function (ine, id, label, data) {
|
||||
|
@ -547,16 +555,17 @@ Vertex.prototype.outDegree = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns the identifier of a vertex
|
||||
/// @startDocuBlock peerGetId
|
||||
///
|
||||
/// @FUN{@FA{vertex}.getId()}
|
||||
/// `peer.getId()`
|
||||
///
|
||||
/// Returns the identifier of the @FA{vertex}. If the vertex was deleted, then
|
||||
/// @LIT{undefined} is returned.
|
||||
/// Returns the identifier of the *peer*. If the vertex was deleted, then
|
||||
/// *undefined* is returned.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-get-id
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.getId = function () {
|
||||
|
@ -564,15 +573,16 @@ Vertex.prototype.getId = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns a property of a vertex
|
||||
/// @startDocuBlock peerGetProperty
|
||||
///
|
||||
/// @FUN{@FA{vertex}.getProperty(@FA{name})}
|
||||
/// `peer.getProperty(edge)`
|
||||
///
|
||||
/// Returns the property @FA{name} a @FA{vertex}.
|
||||
/// Returns the property *edge* a *peer*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-get-property
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.getProperty = function (name) {
|
||||
|
@ -580,15 +590,16 @@ Vertex.prototype.getProperty = function (name) {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief gets all property names of a vertex
|
||||
/// @startDocuBlock peerGetPropertyKeys
|
||||
///
|
||||
/// @FUN{@FA{vertex}.getPropertyKeys()}
|
||||
/// `peer.getPropertyKeys()`
|
||||
///
|
||||
/// Returns all propety names a @FA{vertex}.
|
||||
/// Returns all propety names a *peer*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-get-property-keys
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.getPropertyKeys = function () {
|
||||
|
@ -596,15 +607,16 @@ Vertex.prototype.getPropertyKeys = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns all properties of a vertex
|
||||
/// @startDocuBlock peerproperties
|
||||
///
|
||||
/// @FUN{@FA{vertex}.properties()}
|
||||
/// `peer.properties()`
|
||||
///
|
||||
/// Returns all properties and their values of a @FA{vertex}
|
||||
/// Returns all properties and their values of a *peer*
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-properties
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.properties = function () {
|
||||
|
@ -721,37 +733,38 @@ Graph.prototype.getOrAddVertex = function (id) {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief adds an edge to the graph
|
||||
/// @startDocuBlock graphAddEdge
|
||||
///
|
||||
/// @FUN{@FA{graph}.addEdge(@FA{out}, @FA{in}, @FA{id})}
|
||||
/// `graph.addEdge(out, in, peer)`
|
||||
///
|
||||
/// Creates a new edge from @FA{out} to @FA{in} and returns the edge object. The
|
||||
/// identifier @FA{id} must be a unique identifier or null.
|
||||
/// Creates a new edge from *out* to *out* and returns the edge object. The
|
||||
/// identifier *peer* must be a unique identifier or null.
|
||||
/// out and in can either be vertices or their IDs
|
||||
///
|
||||
/// @FUN{@FA{graph}.addEdge(@FA{out}, @FA{in}, @FA{id}, @FA{label})}
|
||||
/// `graph.addEdge(out, out, peer, label)`
|
||||
///
|
||||
/// Creates a new edge from @FA{out} to @FA{in} with @FA{label} and returns the
|
||||
/// Creates a new edge from *out* to *out* with *label* and returns the
|
||||
/// edge object.
|
||||
/// out and in can either be vertices or their IDs
|
||||
///
|
||||
/// @FUN{@FA{graph}.addEdge(@FA{out}, @FA{in}, @FA{id}, @FA{data})}
|
||||
/// `graph.addEdge(out, out, peer, peer)`
|
||||
///
|
||||
/// Creates a new edge and returns the edge object. The edge contains the
|
||||
/// properties defined in @FA{data}.
|
||||
/// properties defined in *peer*.
|
||||
/// out and in can either be vertices or their IDs
|
||||
///
|
||||
/// @FUN{@FA{graph}.addEdge(@FA{out}, @FA{in}, @FA{id}, @FA{label}, @FA{data})}
|
||||
/// `graph.addEdge(out, out, peer, label, peer)`
|
||||
///
|
||||
/// Creates a new edge and returns the edge object. The edge has the
|
||||
/// label @FA{label} and contains the properties defined in @FA{data}.
|
||||
/// label *label* and contains the properties defined in *peer*.
|
||||
/// out and in can either be vertices or their IDs
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-graph-add-edge
|
||||
///
|
||||
/// @verbinclude graph-graph-add-edge2
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.prototype.addEdge = function (out_vertex, in_vertex, id, label, data, waitForSync) {
|
||||
|
@ -777,19 +790,19 @@ Graph.prototype.addEdge = function (out_vertex, in_vertex, id, label, data, wait
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief adds a vertex to the graph
|
||||
/// @startDocuBlock graphAddVertex
|
||||
///
|
||||
/// @FUN{@FA{graph}.addVertex(@FA{id})}
|
||||
/// `graph.addVertex(peer)`
|
||||
///
|
||||
/// Creates a new vertex and returns the vertex object. The identifier
|
||||
/// @FA{id} must be a unique identifier or null.
|
||||
/// *peer* must be a unique identifier or null.
|
||||
///
|
||||
/// @FUN{@FA{graph}.addVertex(@FA{id}, @FA{data})}
|
||||
/// `graph.addVertex(peer, peer)`
|
||||
///
|
||||
/// Creates a new vertex and returns the vertex object. The vertex contains
|
||||
/// the properties defined in @FA{data}.
|
||||
/// the properties defined in *peer*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Without any properties:
|
||||
///
|
||||
|
@ -798,6 +811,7 @@ Graph.prototype.addEdge = function (out_vertex, in_vertex, id, label, data, wait
|
|||
/// With given properties:
|
||||
///
|
||||
/// @verbinclude graph-graph-add-vertex2
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.prototype.addVertex = function (id, data, waitForSync) {
|
||||
|
@ -807,7 +821,7 @@ Graph.prototype.addVertex = function (id, data, waitForSync) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief replaces an existing vertex by ID
|
||||
///
|
||||
/// @FUN{@FA{graph}.replaceVertex(@FA{id}, @FA{data})}
|
||||
/// @FUN{@FA{graph}.replaceVertex(*peer*, *peer*)}
|
||||
///
|
||||
/// Replaces an existing vertex by ID
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -817,11 +831,12 @@ Graph.prototype.replaceVertex = function (id, data) {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief replaces an existing edge by ID
|
||||
/// @startDocuBlock graphReplaceEdge
|
||||
///
|
||||
/// @FUN{@FA{graph}.replaceEdge(@FA{id}, @FA{data})}
|
||||
/// `graph.replaceEdge(peer, peer)`
|
||||
///
|
||||
/// Replaces an existing edge by ID
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.prototype.replaceEdge = function (id, data) {
|
||||
|
|
|
@ -1462,7 +1462,7 @@ function badParameter (req, res, name) {
|
|||
/// `actions.resultOk(req, res, code, result, headers)`
|
||||
///
|
||||
/// The function defines a response. *code* is the status code to
|
||||
/// return. @*result* is the result object, which will be returned as JSON
|
||||
/// return. *result* is the result object, which will be returned as JSON
|
||||
/// object in the body. *headers* is an array of headers to returned.
|
||||
/// The function adds the attribute *error* with value *false*
|
||||
/// and *code* with value *code* to the *result*.
|
||||
|
|
|
@ -757,14 +757,13 @@ upgradeActions.createSystemColls = function (dispatchers, cmd, isRelaunch,
|
|||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @fn JSF_Cluster_Kickstarter_Constructor
|
||||
/// @brief the cluster kickstarter constructor
|
||||
/// @startDocuBlock JSF_Cluster_Kickstarter_Constructor
|
||||
///
|
||||
/// @FUN{new require("org/arangodb/cluster").Kickstarter(@FA{plan})}
|
||||
/// `new require("org/arangodb/cluster").Kickstarter(plan)`
|
||||
///
|
||||
/// This constructor constructs a kickstarter object. Its first
|
||||
/// argument is a cluster plan as for example provided by the planner
|
||||
/// (see @ref JSF_Cluster_Planner_Constructor and the general
|
||||
/// (see Cluster Planner Constructor and the general
|
||||
/// explanations before this reference). The second argument is
|
||||
/// optional and is taken to be "me" if omitted, it is the ID of the
|
||||
/// dispatcher this object should consider itself to be. If the plan
|
||||
|
@ -774,6 +773,7 @@ upgradeActions.createSystemColls = function (dispatchers, cmd, isRelaunch,
|
|||
///
|
||||
/// The resulting object of this constructors allows to launch,
|
||||
/// shutdown, relaunch the cluster described in the plan.
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function Kickstarter (clusterPlan, myname) {
|
||||
|
@ -787,10 +787,9 @@ function Kickstarter (clusterPlan, myname) {
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @fn JSF_Kickstarter_prototype_launch
|
||||
/// @brief starts a cluster
|
||||
/// @startDocuBlock JSF_Kickstarter_prototype_launch
|
||||
///
|
||||
/// @FUN{@FA{Kickstarter}.launch()}
|
||||
/// `Kickstarter.launch()`
|
||||
///
|
||||
/// This starts up a cluster as described in the plan which was given to
|
||||
/// the constructor. To this end, other dispatchers are contacted as
|
||||
|
@ -801,15 +800,16 @@ function Kickstarter (clusterPlan, myname) {
|
|||
/// processes, this object is also stored in the Kickstarter object
|
||||
/// itself. We do not go into details here about the data structure,
|
||||
/// but the most important information are the process IDs of the
|
||||
/// started processes. The corresponding shutdown method (see @ref
|
||||
/// JSF_Kickstarter_prototype_shutdown) needs this information to
|
||||
/// started processes. The corresponding
|
||||
/// [shutdown method](see ../ModulePlanner/README.html#shutdown) needs this information to
|
||||
/// shut down all processes.
|
||||
///
|
||||
/// Note that all data in the DBservers and all log files and all agency
|
||||
/// information in the cluster is deleted by this call. This is because
|
||||
/// it is intended to set up a cluster for the first time. See
|
||||
/// the relaunch method (see @ref JSF_Kickstarter_prototype_relaunch)
|
||||
/// the [relaunch method](see ../ModulePlanner/README.html#relaunch)
|
||||
/// for restarting a cluster without data loss.
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Kickstarter.prototype.launch = function () {
|
||||
|
@ -882,10 +882,9 @@ Kickstarter.prototype.launch = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @fn JSF_Kickstarter_prototype_relaunch
|
||||
/// @brief restarts a cluster without deleting its data
|
||||
/// @startDocuBlock JSF_Kickstarter_prototype_relaunch
|
||||
///
|
||||
/// @FUN{@FA{Kickstarter}.relaunch()}
|
||||
/// `Kickstarter.relaunch()`
|
||||
///
|
||||
/// This starts up a cluster as described in the plan which was given to
|
||||
/// the constructor. To this end, other dispatchers are contacted as
|
||||
|
@ -896,14 +895,15 @@ Kickstarter.prototype.launch = function () {
|
|||
/// processes, this object is also stored in the Kickstarter object
|
||||
/// itself. We do not go into details here about the data structure,
|
||||
/// but the most important information are the process IDs of the
|
||||
/// started processes. The corresponding shutdown method (see @ref
|
||||
/// JSF_Kickstarter_prototype_shutdown) needs this information to
|
||||
/// started processes. The corresponding
|
||||
/// [shutdown method ](see ../ModulePlanner/README.html#shutdown) needs this information to
|
||||
/// shut down all processes.
|
||||
///
|
||||
/// Note that this methods needs that all data in the DBservers and the
|
||||
/// agency information in the cluster are already set up properly. See
|
||||
/// the launch method (see @ref JSF_Kickstarter_prototype_launch) for
|
||||
/// the [launch method](see ../ModulePlanner/README.html#launch) for
|
||||
/// starting a cluster for the first time.
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Kickstarter.prototype.relaunch = function () {
|
||||
|
@ -976,15 +976,15 @@ Kickstarter.prototype.relaunch = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @fn JSF_Kickstarter_prototype_shutdown
|
||||
/// @brief starts a cluster
|
||||
/// @startDocuBlock JSF_Kickstarter_prototype_shutdown
|
||||
///
|
||||
/// @FUN{@FA{Kickstarter}.shutdown()}
|
||||
/// `Kickstarter.shutdown()`
|
||||
///
|
||||
/// This shuts down a cluster as described in the plan which was given to
|
||||
/// the constructor. To this end, other dispatchers are contacted as
|
||||
/// necessary. All processes in the cluster are gracefully shut down
|
||||
/// in the right order.
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Kickstarter.prototype.shutdown = function() {
|
||||
|
@ -1056,16 +1056,16 @@ Kickstarter.prototype.shutdown = function() {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @fn JSF_Kickstarter_prototype_cleanup
|
||||
/// @brief cleans up all the data of a cluster that has been shutdown
|
||||
/// @startDocuBlock JSF_Kickstarter_prototype_cleanup
|
||||
///
|
||||
/// @FUN{@FA{Kickstarter}.cleanup()}
|
||||
/// `Kickstarter.cleanup()`
|
||||
///
|
||||
/// This cleans up all the data and logs of a previously shut down cluster.
|
||||
/// To this end, other dispatchers are contacted as necessary.
|
||||
/// Use shutdown (see @ref JSF_Kickstarter_prototype_shutdown) first and
|
||||
/// [Use shutdown](see ../ModulePlanner/README.html#shutdown) first and
|
||||
/// use with caution, since potentially a lot of data is being erased with
|
||||
/// this call!
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Kickstarter.prototype.cleanup = function() {
|
||||
|
@ -1133,15 +1133,15 @@ Kickstarter.prototype.cleanup = function() {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @fn JSF_Kickstarter_prototype_isHealthy
|
||||
/// @brief checks that all processes of a running cluster are healthy
|
||||
/// @startDocuBlock JSF_Kickstarter_prototype_isHealthy
|
||||
///
|
||||
/// @FUN{@FA{Kickstarter}.isHealthy()}
|
||||
/// `Kickstarter.isHealthy()`
|
||||
///
|
||||
/// This checks that all processes belonging to a running cluster are
|
||||
/// healthy. To this end, other dispatchers are contacted as necessary.
|
||||
/// At this stage it is only checked that the processes are still up and
|
||||
/// running.
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Kickstarter.prototype.isHealthy = function() {
|
||||
|
@ -1216,10 +1216,9 @@ Kickstarter.prototype.isHealthy = function() {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @fn JSF_Kickstarter_prototype_upgrade
|
||||
/// @brief performs an upgrade on a cluster and starts it at the same time
|
||||
/// @startDocuBlock JSF_Kickstarter_prototype_upgrade
|
||||
///
|
||||
/// @FUN{@FA{Kickstarter}.upgrade()}
|
||||
/// `Kickstarter.upgrade()
|
||||
///
|
||||
/// This performs an upgrade procedure on a cluster as described in
|
||||
/// the plan which was given to the constructor. To this end, other
|
||||
|
@ -1235,14 +1234,15 @@ Kickstarter.prototype.isHealthy = function() {
|
|||
/// processes, this object is also stored in the Kickstarter object
|
||||
/// itself. We do not go into details here about the data structure,
|
||||
/// but the most important information are the process IDs of the
|
||||
/// started processes. The corresponding shutdown method (see @ref
|
||||
/// JSF_Kickstarter_prototype_shutdown) needs this information to
|
||||
/// shut down all processes.
|
||||
/// started processes. The corresponding
|
||||
/// [shutdown method](see ../ModulePlanner/README.html#shutdown) needs
|
||||
/// this information to shut down all processes.
|
||||
///
|
||||
/// Note that this methods needs that all data in the DBservers and the
|
||||
/// agency information in the cluster are already set up properly. See
|
||||
/// the launch method (see @ref JSF_Kickstarter_prototype_launch) for
|
||||
/// the [launch method](see ../ModulePlanner/README.html#launch) for
|
||||
/// starting a cluster for the first time.
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Kickstarter.prototype.upgrade = function (username, password) {
|
||||
|
|
|
@ -225,111 +225,109 @@ function fillConfigWithDefaults (config, defaultConfig) {
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @fn JSF_Cluster_Planner_Constructor
|
||||
/// @brief the cluster planner constructor
|
||||
/// @startDocuBlock JSF_Cluster_Planner_Constructor
|
||||
///
|
||||
/// @FUN{new require("org/arangodb/cluster").Planner(@FA{userConfig})}
|
||||
/// *new require("org/arangodb/cluster").Planner(userConfig)*
|
||||
///
|
||||
/// This constructor builds a cluster planner object. The one and only
|
||||
/// argument is an object that can have the properties described below.
|
||||
/// The planner can plan clusters on a single machine (basically for
|
||||
/// testing purposes) and on multiple machines. The resulting "cluster plans"
|
||||
/// can be used by the kickstarter (see @ref
|
||||
/// JSF_Cluster_Kickstarter_Constructor) to start up the processes comprising
|
||||
/// can be used by the kickstarter to start up the processes comprising
|
||||
/// the cluster, including the agency. To this end, there has to be one
|
||||
/// dispatcher on every machine participating in the cluster. A dispatcher
|
||||
/// is a simple instance of ArangoDB, compiled with the cluster extensions,
|
||||
/// but not running in cluster mode. This is why the configuration option
|
||||
/// `dispatchers` below is of central importance.
|
||||
/// *dispatchers* below is of central importance.
|
||||
///
|
||||
/// - `dispatchers`: an object with a property for each dispatcher,
|
||||
/// - *dispatchers*: an object with a property for each dispatcher,
|
||||
/// the property name is the ID of the dispatcher and the value
|
||||
/// should be an object with at least the property `endpoint`
|
||||
/// should be an object with at least the property *endpoint*
|
||||
/// containing the endpoint of the corresponding dispatcher.
|
||||
/// Further optional properties are:
|
||||
///
|
||||
/// - `avoidPorts` which is an object
|
||||
/// - *avoidPorts* which is an object
|
||||
/// in which all port numbers that should not be used are bound to
|
||||
/// `true`, default is empty, that is, all ports can be used
|
||||
/// - `arangodExtraArgs`, which is a list of additional
|
||||
/// *true*, default is empty, that is, all ports can be used
|
||||
/// - *arangodExtraArgs*, which is a list of additional
|
||||
/// command line arguments that will be given to DBservers and
|
||||
/// coordinators started by this dispatcher, the default is
|
||||
/// an empty list. These arguments will be appended to those
|
||||
/// produced automatically, such that one can overwrite
|
||||
/// things with this.
|
||||
/// - `allowCoordinators`, which is a boolean value indicating
|
||||
/// - *allowCoordinators*, which is a boolean value indicating
|
||||
/// whether or not coordinators should be started on this
|
||||
/// dispatcher, the default is `true`
|
||||
/// - `allowDBservers`, which is a boolean value indicating
|
||||
/// dispatcher, the default is *true*
|
||||
/// - *allowDBservers*, which is a boolean value indicating
|
||||
/// whether or not DBservers should be started on this dispatcher,
|
||||
/// the default is `true`
|
||||
/// - `allowAgents`, which is a boolean value indicating whether or
|
||||
/// the default is *true*
|
||||
/// - *allowAgents*, which is a boolean value indicating whether or
|
||||
/// not agents should be started on this dispatcher, the default is
|
||||
/// `true`
|
||||
/// - `username`, which is a string that contains the user name
|
||||
/// *true*
|
||||
/// - *username*, which is a string that contains the user name
|
||||
/// for authentication with this dispatcher
|
||||
/// - `passwd`, which is a string that contains the password
|
||||
/// - *passwd*, which is a string that contains the password
|
||||
/// for authentication with this dispatcher, if not both
|
||||
/// `username` and `passwd` are set, then no authentication
|
||||
/// *username* and *passwd* are set, then no authentication
|
||||
/// is used between dispatchers. Note that this will not work
|
||||
/// if the dispatchers are configured with authentication.
|
||||
///
|
||||
/// If `.dispatchers` is empty (no property), then an entry for the
|
||||
/// If *.dispatchers* is empty (no property), then an entry for the
|
||||
/// local arangod itself is automatically added. Note that if the
|
||||
/// only configured dispatcher has endpoint `tcp://localhost:`,
|
||||
/// only configured dispatcher has endpoint *tcp://localhost:*,
|
||||
/// all processes are started in a special "local" mode and are
|
||||
/// configured to bind their endpoints only to the localhost device.
|
||||
/// In all other cases both agents and `arangod` instances bind
|
||||
/// In all other cases both agents and *arangod* instances bind
|
||||
/// their endpoints to all available network devices.
|
||||
/// - `numberOfAgents`: the number of agents in the agency,
|
||||
/// - *numberOfAgents*: the number of agents in the agency,
|
||||
/// usually there is no reason to deviate from the default of 3. The
|
||||
/// planner distributes them amongst the dispatchers, if possible.
|
||||
/// - `agencyPrefix`: a string that is used as prefix for all keys of
|
||||
/// - *agencyPrefix*: a string that is used as prefix for all keys of
|
||||
/// configuration data stored in the agency.
|
||||
/// - `numberOfDBservers`: the number of DBservers in the
|
||||
/// - *numberOfDBservers*: the number of DBservers in the
|
||||
/// cluster. The planner distributes them evenly amongst the dispatchers.
|
||||
/// - `startSecondaries`: a boolean flag indicating whether or not
|
||||
/// - *startSecondaries*: a boolean flag indicating whether or not
|
||||
/// secondary servers are started. In this version, this flag is
|
||||
/// silently ignored, since we do not yet have secondary servers.
|
||||
/// - `numberOfCoordinators`: the number of coordinators in the cluster,
|
||||
/// - *numberOfCoordinators*: the number of coordinators in the cluster,
|
||||
/// the planner distributes them evenly amongst the dispatchers.
|
||||
/// - `DBserverIDs`: a list of DBserver IDs (strings). If the planner
|
||||
/// runs out of IDs it creates its own ones using `DBserver`
|
||||
/// - *DBserverIDs*: a list of DBserver IDs (strings). If the planner
|
||||
/// runs out of IDs it creates its own ones using *DBserver*
|
||||
/// concatenated with a unique number.
|
||||
/// - `coordinatorIDs`: a list of coordinator IDs (strings). If the planner
|
||||
/// runs out of IDs it creates its own ones using `Coordinator`
|
||||
/// - *coordinatorIDs*: a list of coordinator IDs (strings). If the planner
|
||||
/// runs out of IDs it creates its own ones using *Coordinator*
|
||||
/// concatenated with a unique number.
|
||||
/// - `dataPath`: this is a string and describes the path under which
|
||||
/// - *dataPath*: this is a string and describes the path under which
|
||||
/// the agents, the DBservers and the coordinators store their
|
||||
/// data directories. This can either be an absolute path (in which
|
||||
/// case all machines in the clusters must use the same path), or
|
||||
/// it can be a relative path. In the latter case it is relative
|
||||
/// to the directory that is configured in the dispatcher with the
|
||||
/// `cluster.data-path` option (command line or configuration file).
|
||||
/// The directories created will be called `data-PREFIX-ID` where
|
||||
/// `PREFIX` is replaced with the agency prefix (see above) and `ID`
|
||||
/// *cluster.data-path* option (command line or configuration file).
|
||||
/// The directories created will be called *data-PREFIX-ID* where
|
||||
/// *PREFIX* is replaced with the agency prefix (see above) and *ID*
|
||||
/// is the ID of the DBserver or coordinator.
|
||||
/// - `logPath`: this is a string and describes the path under which
|
||||
/// - *logPath*: this is a string and describes the path under which
|
||||
/// the DBservers and the coordinators store their log file. This can
|
||||
/// either be an absolute path (in which case all machines in the cluster
|
||||
/// must use the same path), or it can be a relative path. In the
|
||||
/// latter case it is relative to the directory that is configured
|
||||
/// in the dispatcher with the `cluster.log-path` option.
|
||||
/// - `arangodPath`: this is a string and describes the path to the
|
||||
/// actual executable `arangod` that will be started for the
|
||||
/// in the dispatcher with the *cluster.log-path* option.
|
||||
/// - *arangodPath*: this is a string and describes the path to the
|
||||
/// actual executable *arangod* that will be started for the
|
||||
/// DBservers and coordinators. If this is an absolute path, it
|
||||
/// obviously has to be the same on all machines in the cluster
|
||||
/// as described for `dataPath`. If it is an empty string, the
|
||||
/// as described for *dataPath*. If it is an empty string, the
|
||||
/// dispatcher uses the executable that is configured with the
|
||||
/// `cluster.arangod-path` option, which is by default the same
|
||||
/// *cluster.arangod-path* option, which is by default the same
|
||||
/// executable as the dispatcher uses.
|
||||
/// - `agentPath`: this is a string and describes the path to the
|
||||
/// - *agentPath*: this is a string and describes the path to the
|
||||
/// actual executable that will be started for the agents in the
|
||||
/// agency. If this is an absolute path, it obviously has to be
|
||||
/// the same on all machines in the cluster, as described for
|
||||
/// `arangodPath`. If it is an empty string, the dispatcher
|
||||
/// uses its `cluster.agent-path` option.
|
||||
/// - `agentExtPorts`: a list of port numbers to use for the external
|
||||
/// *arangodPath*. If it is an empty string, the dispatcher
|
||||
/// uses its *cluster.agent-path* option.
|
||||
/// - *agentExtPorts*: a list of port numbers to use for the external
|
||||
/// ports of the agents. When running out of numbers in this list,
|
||||
/// the planner increments the last one used by one for every port
|
||||
/// needed. Note that the planner checks availability of the ports
|
||||
|
@ -337,44 +335,47 @@ function fillConfigWithDefaults (config, defaultConfig) {
|
|||
/// different machines, and uses only ports that are free during
|
||||
/// the planning phase. Obviously, if those ports are connected
|
||||
/// before the actual startup, things can go wrong.
|
||||
/// - `agentIntPorts`: a list of port numbers to use for the internal
|
||||
/// ports of the agents. The same comments as for `agentExtPorts`
|
||||
/// - *agentIntPorts*: a list of port numbers to use for the internal
|
||||
/// ports of the agents. The same comments as for *agentExtPorts*
|
||||
/// apply.
|
||||
/// - `DBserverPorts`: a list of port numbers to use for the
|
||||
/// DBservers. The same comments as for `agentExtPorts` apply.
|
||||
/// - `coordinatorPorts`: a list of port numbers to use for the
|
||||
/// coordinators. The same comments as for `agentExtPorts` apply.
|
||||
/// - `useSSLonDBservers`: a boolean flag indicating whether or not
|
||||
/// - *DBserverPorts*: a list of port numbers to use for the
|
||||
/// DBservers. The same comments as for *agentExtPorts* apply.
|
||||
/// - *coordinatorPorts*: a list of port numbers to use for the
|
||||
/// coordinators. The same comments as for *agentExtPorts* apply.
|
||||
/// - *useSSLonDBservers*: a boolean flag indicating whether or not
|
||||
/// we use SSL on all DBservers in the cluster
|
||||
/// - `useSSLonCoordinators`: a boolean falg indicating whether or not
|
||||
/// - *useSSLonCoordinators*: a boolean flag indicating whether or not
|
||||
/// we use SSL on all coordinators in the cluster
|
||||
///
|
||||
/// All these values have default values. Here is the current set of
|
||||
/// default values:
|
||||
///
|
||||
/// {
|
||||
/// "agencyPrefix" : "arango",
|
||||
/// "numberOfAgents" : 1,
|
||||
/// "numberOfDBservers" : 2,
|
||||
/// "startSecondaries" : false,
|
||||
/// "numberOfCoordinators" : 1,
|
||||
/// "DBserverIDs" : ["Pavel", "Perry", "Pancho", "Paul", "Pierre",
|
||||
/// "Pit", "Pia", "Pablo" ],
|
||||
/// "coordinatorIDs" : ["Claus", "Chantalle", "Claire", "Claudia",
|
||||
/// "Claas", "Clemens", "Chris" ],
|
||||
/// "dataPath" : "", // means configured in dispatcher
|
||||
/// "logPath" : "", // means configured in dispatcher
|
||||
/// "arangodPath" : "", // means configured as dispatcher
|
||||
/// "agentPath" : "", // means configured in dispatcher
|
||||
/// "agentExtPorts" : [4001],
|
||||
/// "agentIntPorts" : [7001],
|
||||
/// "DBserverPorts" : [8629],
|
||||
/// "coordinatorPorts" : [8530],
|
||||
/// "dispatchers" : {"me": {"endpoint": "tcp://localhost:"}},
|
||||
/// // this means only we as a local instance
|
||||
/// "useSSLonDBservers" : false,
|
||||
/// "useSSLonCoordinators" : false
|
||||
/// };
|
||||
/// ```js
|
||||
/// {
|
||||
/// "agencyPrefix" : "arango",
|
||||
/// "numberOfAgents" : 1,
|
||||
/// "numberOfDBservers" : 2,
|
||||
/// "startSecondaries" : false,
|
||||
/// "numberOfCoordinators" : 1,
|
||||
/// "DBserverIDs" : ["Pavel", "Perry", "Pancho", "Paul", "Pierre",
|
||||
/// "Pit", "Pia", "Pablo" ],
|
||||
/// "coordinatorIDs" : ["Claus", "Chantalle", "Claire", "Claudia",
|
||||
/// "Claas", "Clemens", "Chris" ],
|
||||
/// "dataPath" : "", // means configured in dispatcher
|
||||
/// "logPath" : "", // means configured in dispatcher
|
||||
/// "arangodPath" : "", // means configured as dispatcher
|
||||
/// "agentPath" : "", // means configured in dispatcher
|
||||
/// "agentExtPorts" : [4001],
|
||||
/// "agentIntPorts" : [7001],
|
||||
/// "DBserverPorts" : [8629],
|
||||
/// "coordinatorPorts" : [8530],
|
||||
/// "dispatchers" : {"me": {"endpoint": "tcp://localhost:"}},
|
||||
/// // this means only we as a local instance
|
||||
/// "useSSLonDBservers" : false,
|
||||
/// "useSSLonCoordinators" : false
|
||||
/// };
|
||||
/// ```
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function Planner (userConfig) {
|
||||
|
@ -645,14 +646,13 @@ Planner.prototype.makePlan = function() {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @fn JSF_Planner_prototype_getPlan
|
||||
/// @brief returns the cluster plan as a JavaScript object.
|
||||
/// @startDocuBlock JSF_Planner_prototype_getPlan
|
||||
///
|
||||
/// @FUN{@FA{Planner}.getPlan()}
|
||||
/// `Planner.getPlan()`
|
||||
///
|
||||
/// returns the cluster plan as a JavaScript object. The result of this
|
||||
/// method can be given to the constructor of a Kickstarter (see
|
||||
/// @ref JSF_Cluster_Kickstarter_Constructor).
|
||||
/// method can be given to the constructor of a Kickstarter.
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Planner.prototype.getPlan = function() {
|
||||
|
|
|
@ -97,15 +97,16 @@ var findOrCreateEdgeCollectionByName = function (name) {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief changes a property of an edge
|
||||
/// @startDocuBlock edgeSetProperty
|
||||
///
|
||||
/// @FUN{@FA{edge}.setProperty(@FA{name}, @FA{value})}
|
||||
/// `edge.setProperty(name, value)`
|
||||
///
|
||||
/// Changes or sets the property @FA{name} an @FA{edges} to @FA{value}.
|
||||
/// Changes or sets the property *name* an *edges* to *value*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-edge-set-property
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Edge.prototype.setProperty = function (name, value) {
|
||||
|
@ -134,15 +135,16 @@ Edge.prototype.setProperty = function (name, value) {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief inbound and outbound edges
|
||||
/// @startDocuBlock vertexEdges
|
||||
///
|
||||
/// @FUN{@FA{vertex}.edges()}
|
||||
/// `vertex.edges()`
|
||||
///
|
||||
/// Returns a list of in- or outbound edges of the @FA{vertex}.
|
||||
/// Returns a list of in- or outbound edges of the *vertex*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-edges
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.edges = function () {
|
||||
|
@ -154,15 +156,16 @@ Vertex.prototype.edges = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief inbound edges with given label
|
||||
/// @startDocuBlock vertexGetInEdges
|
||||
///
|
||||
/// @FUN{@FA{vertex}.getInEdges(@FA{label}, ...)}
|
||||
///`vertex.getInEdges(label, ...)`
|
||||
///
|
||||
/// Returns a list of inbound edges of the @FA{vertex} with given label(s).
|
||||
/// Returns a list of inbound edges of the *vertex* with given label(s).
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-get-in-edges
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.getInEdges = function () {
|
||||
|
@ -179,15 +182,16 @@ Vertex.prototype.getInEdges = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief outbound edges with given label
|
||||
/// @startDocuBlock vertexGetOutEdges
|
||||
///
|
||||
/// @FUN{@FA{vertex}.getOutEdges(@FA{label}, ...)}
|
||||
/// `vertex.getOutEdges(label, ...)`
|
||||
///
|
||||
/// Returns a list of outbound edges of the @FA{vertex} with given label(s).
|
||||
/// Returns a list of outbound edges of the *vertex* with given label(s).
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-get-out-edges
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.getOutEdges = function () {
|
||||
|
@ -204,12 +208,13 @@ Vertex.prototype.getOutEdges = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief in- or outbound edges with given label
|
||||
/// @startDocuBlock vertexGetEdges
|
||||
///
|
||||
/// @FUN{@FA{vertex}.getEdges(@FA{label}, ...)}
|
||||
/// `vertex.getEdges(label, ...)`
|
||||
///
|
||||
/// Returns a list of in- or outbound edges of the @FA{vertex} with given
|
||||
/// Returns a list of in- or outbound edges of the *vertex* with given
|
||||
/// label(s).
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.getEdges = function () {
|
||||
|
@ -226,15 +231,16 @@ Vertex.prototype.getEdges = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief inbound edges
|
||||
/// @startDocuBlock vertexInbound
|
||||
///
|
||||
/// @FUN{@FA{vertex}.inbound()}
|
||||
/// `vertex.inbound()`
|
||||
///
|
||||
/// Returns a list of inbound edges of the @FA{vertex}.
|
||||
/// Returns a list of inbound edges of the *vertex*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-inbound
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.inbound = function () {
|
||||
|
@ -246,15 +252,16 @@ Vertex.prototype.inbound = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief outbound edges
|
||||
/// @startDocuBlock vertexOutbound
|
||||
///
|
||||
/// @FUN{@FA{vertex}.outbound()}
|
||||
/// `vertex.outbound()`
|
||||
///
|
||||
/// Returns a list of outbound edges of the @FA{vertex}.
|
||||
/// Returns a list of outbound edges of the *vertex*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-outbound
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.outbound = function () {
|
||||
|
@ -266,15 +273,16 @@ Vertex.prototype.outbound = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief changes a property of a vertex
|
||||
/// @startDocuBlock vertexSetProperty
|
||||
///
|
||||
/// @FUN{@FA{vertex}.setProperty(@FA{name}, @FA{value})}
|
||||
/// `vertex.setProperty(name, value)`
|
||||
///
|
||||
/// Changes or sets the property @FA{name} a @FA{vertex} to @FA{value}.
|
||||
/// Changes or sets the property *name* a *vertex* to *value*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-vertex-set-property
|
||||
/// @endDocuBLock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vertex.prototype.setProperty = function (name, value) {
|
||||
|
@ -299,22 +307,23 @@ Vertex.prototype.setProperty = function (name, value) {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief constructs a new graph object
|
||||
/// @startDocuBlock graphConstruct
|
||||
///
|
||||
/// @FUN{Graph(@FA{name}, @FA{vertices}, @FA{edges})}
|
||||
/// `Graph(name, vertices, edges)`
|
||||
///
|
||||
/// Constructs a new graph object using the collection @FA{vertices} for all
|
||||
/// vertices and the collection @FA{edges} for all edges. Note that it is
|
||||
/// Constructs a new graph object using the collection *vertices* for all
|
||||
/// vertices and the collection *edges* for all edges. Note that it is
|
||||
/// possible to construct two graphs with the same vertex set, but different
|
||||
/// edge sets.
|
||||
///
|
||||
/// @FUN{Graph(@FA{name})}
|
||||
/// `Graph(name)`
|
||||
///
|
||||
/// Returns a known graph.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-constructor
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.prototype.initialize = function (name, vertices, edges, waitForSync) {
|
||||
|
@ -484,12 +493,12 @@ Graph.prototype.initialize = function (name, vertices, edges, waitForSync) {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @fn JSF_graph_getAll
|
||||
/// @brief returns all available graphs
|
||||
/// @startDocuBlock JSF_graph_getAll
|
||||
///
|
||||
/// @FUN{@FA{graph}.getAll()}
|
||||
/// `graph.getAll()`
|
||||
///
|
||||
/// Returns all available graphs.
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.getAll = function getAllGraphs () {
|
||||
|
@ -534,11 +543,12 @@ Graph.drop = function (name, waitForSync) {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief drops the graph, the vertices, and the edges
|
||||
/// @startDocuBlock graphDrop
|
||||
///
|
||||
/// @FUN{@FA{graph}.drop(@FA{waitForSync})}
|
||||
/// `graph.drop(waitForSync)`
|
||||
///
|
||||
/// Drops the graph, the vertices, and the edges. Handle with care.
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.prototype.drop = function (waitForSync) {
|
||||
|
@ -597,15 +607,16 @@ Graph.prototype._replaceEdge = function (edge_id, data) {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns a vertex given its id
|
||||
/// @startDocuBlock graphGetVertex
|
||||
///
|
||||
/// @FUN{@FA{graph}.getVertex(@FA{id})}
|
||||
/// `graph.getVertex(id)`
|
||||
///
|
||||
/// Returns the vertex identified by @FA{id} or @LIT{null}.
|
||||
/// Returns the vertex identified by *id* or *null*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-graph-get-vertex
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.prototype.getVertex = function (id) {
|
||||
|
@ -618,16 +629,17 @@ Graph.prototype.getVertex = function (id) {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns an iterator for all vertices
|
||||
/// @startDocuBlock GraphGetVertices
|
||||
///
|
||||
/// @FUN{@FA{graph}.getVertices()}
|
||||
/// `graph.getVertices()`
|
||||
///
|
||||
/// Returns an iterator for all vertices of the graph. The iterator supports the
|
||||
/// methods @FN{hasNext} and @FN{next}.
|
||||
/// methods *hasNext* and *next*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-graph-get-vertices
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.prototype.getVertices = function () {
|
||||
|
@ -641,15 +653,16 @@ Graph.prototype.getVertices = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns an edge given its id
|
||||
/// @startDocuBlock graphGetEdge
|
||||
///
|
||||
/// @FUN{@FA{graph}.getEdge(@FA{id})}
|
||||
/// `graph.getEdge(id)`
|
||||
///
|
||||
/// Returns the edge identified by @FA{id} or @LIT{null}.
|
||||
/// Returns the edge identified by *id* or *null*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-graph-get-edge
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.prototype.getEdge = function (id) {
|
||||
|
@ -675,16 +688,17 @@ Graph.prototype.getEdge = function (id) {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns an iterator for all edges
|
||||
/// @startDocuBLock graphGetEdges
|
||||
///
|
||||
/// @FUN{@FA{graph}.getEdges()}
|
||||
/// `graph.getEdges()`
|
||||
///
|
||||
/// Returns an iterator for all edges of the graph. The iterator supports the
|
||||
/// methods @FN{hasNext} and @FN{next}.
|
||||
/// methods *hasNext* and *next*.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-graph-get-edges
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.prototype.getEdges = function () {
|
||||
|
@ -697,15 +711,16 @@ Graph.prototype.getEdges = function () {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief removes a vertex and all in- or out-bound edges
|
||||
/// @startDocuBlock graphRemoveVertex
|
||||
///
|
||||
/// @FUN{@FA{graph}.removeVertex(@FA{vertex},@FA{waitForSync})}
|
||||
/// `graph.removeVertex(vertex, waitForSync)`
|
||||
///
|
||||
/// Deletes the @FA{vertex} and all its edges.
|
||||
/// Deletes the *vertex* and all its edges.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-graph-remove-vertex
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.prototype.removeVertex = function (vertex, waitForSync) {
|
||||
|
@ -729,15 +744,16 @@ Graph.prototype.removeVertex = function (vertex, waitForSync) {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief removes an edge
|
||||
/// @startDocuBlock graph RemoveEdge
|
||||
///
|
||||
/// @FUN{@FA{graph}.removeEdge(@FA{vertex},@FA{waitForSync})}
|
||||
/// `graph.removeEdge(vertex, waitForSync)`
|
||||
///
|
||||
/// Deletes the @FA{edge}. Note that the in and out vertices are left untouched.
|
||||
/// Deletes the *edge*. Note that the in and out vertices are left untouched.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-graph-remove-edge
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Graph.prototype.removeEdge = function (edge, waitForSync) {
|
||||
|
|
Loading…
Reference in New Issue