xdmp:forest-online( $forestID as xs:unsignedLong, [$timestamp as xs:unsignedLong], [$isReplica as xs:boolean], [$syncingOk as xs:boolean] ) as xs:boolean
Returns true if the specified forest is online with a state of
open
, open replica
or
sync replicating
if isReplica is true, or
syncing replica
if syncingOk is true,
otherwise returns false. For a remote forest, returns false if
the cached forest online status is older than the specified timestamp.
http://marklogic.com/xdmp/privileges/status
xdmp:forest-online(xdmp:forest("Documents")) => true
xdmp:forest-online(xdmp:forest("Documents"), xdmp:wallclock-to-timestamp(fn:current-dateTime()), fn:true()) => true if a forest is in open or sync-replicating state.