Loading TOC...

flexrep functions

The table below lists all the flexrep built-in functions (in this namespace: http://marklogic.com/xdmp/flexible-replication).

The Flexible Replication API module contains functions that allow you to write scripts to configure flexible replication.

The Flexible Replication API is installed as the following file:

install_dir/Modules/MarkLogic/flexrep.xqy

where install_dir is the directory in which MarkLogic Server is installed.

To use the flexrep.xqy module in your own XQuery modules, include the following line in your XQuery prolog:

   import module namespace flexrep = "http://marklogic.com/xdmp/flexible-replication" 
           at "/MarkLogic/flexrep.xqy"; 

The library uses the flexrep: namespace, which is not predefined in the server.

MarkLogic recommends enabling the URI Lexicon when using Flexible Replication; the URI lexicon will improve performance, especially when the database grows to a large number of documents.

85 functions
Function name Description
flexrep:apply This function applies an update element to the current database.
flexrep:binary-chunk-uris This function returns the URIs of binary chunks that were created before the given dateTime.
flexrep:configuration-create This function creates a new replication configuration element.
flexrep:configuration-delete This function deletes a replication configuration.
flexrep:configuration-domain-ids This function returns the IDs of the domains configured for the Master database.
flexrep:configuration-get This function gets the replication configuration for a CPF domain.
flexrep:configuration-get-alerting-uri Get the alerting URI associated with a FlexRep configuration.
flexrep:configuration-get-domain-name This function returns the domain name associated with the specified replication configuration.
flexrep:configuration-get-id This function returns the ID of the replication configuration.
flexrep:configuration-insert This function inserts a replication configuration to the database.
flexrep:configuration-set-alerting-uri Set the alerting URI for a FlexRep configuration.
flexrep:configuration-target This function returns a specified target for a configuration, or throws an error if it does not exist.
flexrep:configuration-target-get-documents-per-batch This function returns the value of the documents-per-batch setting for the replication target.
flexrep:configuration-target-get-enabled This function returns true if the specified replication target is enabled, otherwise it returns false.
flexrep:configuration-target-get-external-user This function returns the external user information for a target, if any exists.
flexrep:configuration-target-get-filter-module This function returns the filter module used by the specified replication target.
flexrep:configuration-target-get-filter-options This function returns the filter options configured for the specified replication target.
flexrep:configuration-target-get-http-options This function returns the HTTP options configured for the specified replication target.
flexrep:configuration-target-get-id This function returns the ID of the named replication target.
flexrep:configuration-target-get-immediate-push Get the immediate push flag for a target.
flexrep:configuration-target-get-name This function returns the name of the specified target.
flexrep:configuration-target-get-replicate-cpf This function returns true if CFG replication is enabled for the specified replication target, otherwise it returns false.
flexrep:configuration-target-get-retry-seconds-max This function sets the replication retry maximum value for the specified replication target.
flexrep:configuration-target-get-retry-seconds-min This function returns the value of the minimum retry setting for the replication target.
flexrep:configuration-target-get-urls This function returns the URLs for the specified targets.
flexrep:configuration-target-get-user-id Get the user ID associated with a target, if one exists.
flexrep:configuration-target-set-documents-per-batch This function sets the documents-per-batch value for the specified replication target.
flexrep:configuration-target-set-enabled This function enables or disables the specified replication target.
flexrep:configuration-target-set-filter-module This function sets the specified filter for this replication configuration.
flexrep:configuration-target-set-filter-options This function sets the specified filter options for this replication configuration.
flexrep:configuration-target-set-http-options This function sets the HTTP options on the specified replication target.
flexrep:configuration-target-set-immediate-push Set a target's "immediate push" flag.
flexrep:configuration-target-set-name This function sets the name of the specified replication target.
flexrep:configuration-target-set-replicate-cpf This function enables and disables CPF replication.
flexrep:configuration-target-set-retry-seconds-max This function sets the replication retry maximum value for the specified replication target.
flexrep:configuration-target-set-retry-seconds-min This function sets the replication retry minimum value for the specified replication target.
flexrep:configuration-target-set-urls This function sets the URLs for the specified replication target.
flexrep:configuration-target-set-user-id Set a target's user-id.
flexrep:configuration-targets This function returns the replication targets for a configuration.
flexrep:configure-database This function creates any indexes needed for CPF based replication.
flexrep:create-appserver This function creates a flexrep App Server programatically, without needing to know all of the specific settings.
flexrep:database-needs-configuration This function checks the configuration of a database to see if it has all of the necessary indexes for Flexible Replication to work at its best.
flexrep:delete This function applies a delete element to the current database.
flexrep:do-pull This function is used by a Replica to pull updates from the Master.
flexrep:document-reset This function resets the URI status for all replication targets.
flexrep:document-status This function returns the flexrep:document-status element for the document at the specified URI in the specified domain.
flexrep:domain-alerting-uri Generate an alerting URI for a CPF domain.
flexrep:domain-status This function returns the replication status for the specified replicated CPF domain.
flexrep:domain-target-reset This function resets the domain for the specified replication targets.
flexrep:domain-target-statuses This function returns the status for each domain target.
flexrep:get-domain-name Get a CPF domain's name.
flexrep:get-target-name Get a target's name, or nothing if the domain or target does not exist.
flexrep:inbound-filter-create This function creates an inbound filter element.
flexrep:inbound-filter-delete This function deletes the inbound filter for this database.
flexrep:inbound-filter-get This function gets any inbound filter that is contained in the database, or an empty sequence if none is configured.
flexrep:inbound-filter-insert This function inserts an inbound filter configuration into the database.
flexrep:process This function processes one or more replicated updates for the specified domain ID, ordered by oldest changes first, and returns the results.
flexrep:pull-create This function creates a configuration on a Replica database to pull updates from the Master database.
flexrep:pull-delete This function deletes the pull configuration from the Replica database.
flexrep:pull-get This function returns the pull replication configuration for the specified domain.
flexrep:pull-get-all This function returns the pull replication configurations for all of the domains.
flexrep:pull-get-by-id This function returns the pull replication configuration for the specified Pull ID.
flexrep:pull-get-domain-id This function returns the ID of the domain associated with the specified pull configuration.
flexrep:pull-get-enabled Get the enabled flag for a pull configuration.
flexrep:pull-get-http-options This function returns the HTTP options associated with the specified pull configuration.
flexrep:pull-get-id This function returns the ID for the specified pull configuration.
flexrep:pull-get-name This function returns the name of the specified pull configuration.
flexrep:pull-get-target-id This function returns the ID of the target associated with the specified pull configuration.
flexrep:pull-get-urls This function returns the URLs associated with the specified pull configuration.
flexrep:pull-insert This function inserts the specified pull configuration into the Replica database.
flexrep:pull-set-domain-id This function sets the domain ID for the specified pull configuration.
flexrep:pull-set-enabled Set the enabled flag for a pull.
flexrep:pull-set-http-options This function sets the HTTP options for the specified pull configuration.
flexrep:pull-set-name This function sets the name of the specified pull configuration.
flexrep:pull-set-target-id This function sets the ID of the replication target for the specified pull replication configuration.
flexrep:pull-set-urls This function sets the URLs for the specified pull configuration.
flexrep:push-local-forest This function pushes pending replication updates (either retries or zero-day) for the specified forest on the current host.
flexrep:push-local-forest-target Push a batch of documents from a single forest to a single target, and respawn a new task to do this repeatedly until either nothing remains to replicate or the spawn limit is reached.
flexrep:push-local-forests This function pushes deletes and any pending replication updates (either retries or zero-day) from all of the forests on the current host.
flexrep:remote-target-status This function returns the status of the target in a pull replication configuration.
flexrep:target-create This function creates a new target and add it to the specified configuration.
flexrep:target-delete This function deletes a target from a replication configuration.
flexrep:target-error-documents This function returns status information for documents that failed to replicate for the specified domain and targets.
flexrep:target-status This function returns the replication status for the specified targets within the specified replicated domain.
flexrep:upgrade-appserver This function is used by appserver upgrade code.