flexrep.pullGet

flexrep.pullGet(
   domain-id as (Number|String),
   [assert as Boolean]
) as Sequence

Summary

This function returns the pull replication configuration for the specified domain.

Parameters
domain-id The ID of the domain containing the replicated content. This value is obtained from the Trigger database used by the Master database.
assert Set to true to throw an exception if the configuration does not exist. The default value is false.

Example

// Execute against a Replica database. 
const flexrep = require('/MarkLogic/flexrep');
  // Obtain the domain ID from the database used by the Master to enable CPF.
  const domain = xdmp.eval(
    'const dom = require("/MarkLogic/cpf/domains");' +
      'fn.data(dom.get("Default Master").xpath("//dom:domain-id"));',
       null,
         {
          'database' : xdmp.database('Triggers')
         });

  const cfg = flexrep.configurationGet(domain, true);
  const domainId = flexrep.configurationGetId(cfg);

flexrep.pullGet(domainId, true);

//Returns the Pull Configuration for the specified domain.
   

Required Privileges

http://marklogic.com/xdmp/privileges/flexrep-admin

Powered by MarkLogic Server | Terms of Use | Privacy Policy