flexrep.targetStatus( domain-id as (Number|String), target-ids as (Number|String)[] ) as Sequence
This function returns the replication status for the specified targets within the specified replicated domain.
Parameters | |
---|---|
domain-id | The ID of the replicated domain. |
target-ids | The IDs of the replication targets. |
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') }); let cfg = flexrep.configurationGet(domain, true); let targetId = flexrep.configurationTargetGetId(cfg, 'Replica'); flexrep.targetStatus(domain, targetId); // Returns the status of the specified target.
http://marklogic.com/xdmp/privileges/flexrep-user