flexrep:create-appserver

flexrep:create-appserver(
   $cfg as element(configuration),
   $group as xs:unsignedLong,
   $name as xs:string,
   $port as xs:unsignedLong,
   $db as xs:unsignedLong
) as element(configuration)

Summary

This function creates a flexrep App Server programatically, without needing to know all of the specific settings.

Parameters
cfg The replication configuration to use for the new App Server.
group The ID of the group to which the App Server will be added. Typically, this is the result of an admin:group-get-id call.
name The name for the new App Server.
port The port on which the App Server listens. The port must be available on the host.
db The ID for the database connected to this App Server.

Example


xquery version "1.0-ml"; 
 
import module namespace flexrep = "http://marklogic.com/xdmp/flexible-replication" 
      at "/MarkLogic/flexrep.xqy";
	  
let $cfg := admin:get-configuration()
return
  admin:save-configuration(
    flexrep:create-appserver(
      $cfg,
      xdmp:group("Default"),
      "FlexRep-foo",
      9000,
      xdmp:database("foo")))  
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy