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.binaryChunkUris This function returns the URIs of binary chunks that were created before the given dateTime.
flexrep.configurationCreate This function creates a new replication configuration element.
flexrep.configurationDelete This function deletes a replication configuration.
flexrep.configurationDomainIds This function returns the IDs of the domains configured for the Master database.
flexrep.configurationGet This function gets the replication configuration for a CPF domain.
flexrep.configurationGetAlertingUri Get the alerting URI associated with a FlexRep configuration.
flexrep.configurationGetDomainName This function returns the domain name associated with the specified replication configuration.
flexrep.configurationGetId This function returns the ID of the replication configuration.
flexrep.configurationInsert This function inserts a replication configuration to the database.
flexrep.configurationSetAlertingUri Set the alerting URI for a FlexRep configuration.
flexrep.configurationTarget This function returns a specified target for a configuration, or throws an error if it does not exist.
flexrep.configurationTargetGetDocumentsPerBatch This function returns the value of the documents-per-batch setting for the replication target.
flexrep.configurationTargetGetEnabled This function returns true if the specified replication target is enabled, otherwise it returns false.
flexrep.configurationTargetGetExternalUser This function returns the external user information for a target, if any exists.
flexrep.configurationTargetGetFilterModule This function returns the filter module used by the specified replication target.
flexrep.configurationTargetGetFilterOptions This function returns the filter options configured for the specified replication target.
flexrep.configurationTargetGetHttpOptions This function returns the HTTP options configured for the specified replication target.
flexrep.configurationTargetGetId This function returns the ID of the named replication target.
flexrep.configurationTargetGetImmediatePush Get the immediate push flag for a target.
flexrep.configurationTargetGetName This function returns the name of the specified target.
flexrep.configurationTargetGetReplicateCpf This function returns true if CFG replication is enabled for the specified replication target, otherwise it returns false.
flexrep.configurationTargetGetRetrySecondsMax This function sets the replication retry maximum value for the specified replication target.
flexrep.configurationTargetGetRetrySecondsMin This function returns the value of the minimum retry setting for the replication target.
flexrep.configurationTargetGetUrls This function returns the URLs for the specified targets.
flexrep.configurationTargetGetUserId Get the user ID associated with a target, if one exists.
flexrep.configurationTargets This function returns the replication targets for a configuration.
flexrep.configurationTargetSetDocumentsPerBatch This function sets the documents-per-batch value for the specified replication target.
flexrep.configurationTargetSetEnabled This function enables or disables the specified replication target.
flexrep.configurationTargetSetFilterModule This function sets the specified filter for this replication configuration.
flexrep.configurationTargetSetFilterOptions This function sets the specified filter options for this replication configuration.
flexrep.configurationTargetSetHttpOptions This function sets the HTTP options on the specified replication target.
flexrep.configurationTargetSetImmediatePush Set a target's "immediate push" flag.
flexrep.configurationTargetSetName This function sets the name of the specified replication target.
flexrep.configurationTargetSetReplicateCpf This function enables and disables CPF replication.
flexrep.configurationTargetSetRetrySecondsMax This function sets the replication retry maximum value for the specified replication target.
flexrep.configurationTargetSetRetrySecondsMin This function sets the replication retry minimum value for the specified replication target.
flexrep.configurationTargetSetUrls This function sets the URLs for the specified replication target.
flexrep.configurationTargetSetUserId Set a target's user-id.
flexrep.configureDatabase This function creates any indexes needed for CPF based replication.
flexrep.createAppserver This function creates a flexrep App Server programatically, without needing to know all of the specific settings.
flexrep.databaseNeedsConfiguration 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.documentReset This function resets the URI status for all replication targets.
flexrep.documentStatus This function returns the flexrep.documentStatus element for the document at the specified URI in the specified domain.
flexrep.domainAlertingUri Generate an alerting URI for a CPF domain.
flexrep.domainStatus This function returns the replication status for the specified replicated CPF domain.
flexrep.domainTargetReset This function resets the domain for the specified replication targets.
flexrep.domainTargetStatuses This function returns the status for each domain target.
flexrep.doPull This function is used by a Replica to pull updates from the Master.
flexrep.getDomainName Get a CPF domain's name.
flexrep.getTargetName Get a target's name, or nothing if the domain or target does not exist.
flexrep.inboundFilterCreate This function creates an inbound filter element.
flexrep.inboundFilterDelete This function deletes the inbound filter for this database.
flexrep.inboundFilterGet This function gets any inbound filter that is contained in the database, or an empty sequence if none is configured.
flexrep.inboundFilterInsert 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.pullCreate This function creates a configuration on a Replica database to pull updates from the Master database.
flexrep.pullDelete This function deletes the pull configuration from the Replica database.
flexrep.pullGet This function returns the pull replication configuration for the specified domain.
flexrep.pullGetAll This function returns the pull replication configurations for all of the domains.
flexrep.pullGetById This function returns the pull replication configuration for the specified Pull ID.
flexrep.pullGetDomainId This function returns the ID of the domain associated with the specified pull configuration.
flexrep.pullGetEnabled Get the enabled flag for a pull configuration.
flexrep.pullGetHttpOptions This function returns the HTTP options associated with the specified pull configuration.
flexrep.pullGetId This function returns the ID for the specified pull configuration.
flexrep.pullGetName This function returns the name of the specified pull configuration.
flexrep.pullGetTargetId This function returns the ID of the target associated with the specified pull configuration.
flexrep.pullGetUrls This function returns the URLs associated with the specified pull configuration.
flexrep.pullInsert This function inserts the specified pull configuration into the Replica database.
flexrep.pullSetDomainId This function sets the domain ID for the specified pull configuration.
flexrep.pullSetEnabled Set the enabled flag for a pull.
flexrep.pullSetHttpOptions This function sets the HTTP options for the specified pull configuration.
flexrep.pullSetName This function sets the name of the specified pull configuration.
flexrep.pullSetTargetId This function sets the ID of the replication target for the specified pull replication configuration.
flexrep.pullSetUrls This function sets the URLs for the specified pull configuration.
flexrep.pushLocalForest This function pushes pending replication updates (either retries or zero-day) for the specified forest on the current host.
flexrep.pushLocalForests This function pushes deletes and any pending replication updates (either retries or zero-day) from all of the forests on the current host.
flexrep.pushLocalForestTarget 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.remoteTargetStatus This function returns the status of the target in a pull replication configuration.
flexrep.targetCreate This function creates a new target and add it to the specified configuration.
flexrep.targetDelete This function deletes a target from a replication configuration.
flexrep.targetErrorDocuments This function returns status information for documents that failed to replicate for the specified domain and targets.
flexrep.targetStatus This function returns the replication status for the specified targets within the specified replicated domain.
flexrep.upgradeAppserver This function is used by appserver upgrade code.