1MONGOC_TOPOLOGY_DESCRIPTION_HMAOSN_MGRoOEnCAg_DoTADOBBPLOECL_OSDGErYRi_VvDEeERrS(C3R)IPTION_HAS_READABLE_SERVER(3)
2
3
4

NAME

6       mongoc_topology_description_has_readable_server     -     mongoc_topol‐
7       ogy_description_has_readable_server()
8

SYNOPSIS

10          bool
11          mongoc_topology_description_has_readable_server (
12             mongoc_topology_description_t *td, const mongoc_read_prefs_t *prefs);
13
14       Determines if the topology has a readable  server  available.   Servers
15       are  filtered  by the given read preferences only if the driver is con‐
16       nected to a replica set, otherwise the read  preferences  are  ignored.
17       This  function  uses the driver's current knowledge of the state of the
18       MongoDB server or servers it is connected to; it does  no  I/O  and  it
19       does not block.
20
21       Use  this  function in a topology-changed callback registered with mon‐
22       goc_apm_set_topology_changed_cb.  For  historical  reasons,  the   mon‐
23       goc_topology_description_t  passed  to the callback is a const pointer,
24       you  must  cast  away  const  to  pass  the  pointer  to  mongoc_topol‐
25       ogy_description_has_readable_server.
26

PARAMETERS

28       · td: A mongoc_topology_description_t.
29
30       · read_prefs:  A  mongoc_read_prefs_t  or NULL for default read prefer‐
31         ences.
32

RETURNS

34       True if there is a known server matching prefs.
35

SEE ALSO

37       Introduction to Application Performance Monitoring
38

AUTHOR

40       MongoDB, Inc
41
43       2017-present, MongoDB, Inc
44
45
46
47
481.13.1                      MONGOJCa_nTO2P4O,LO2G0Y1_9DESCRIPTION_HAS_READABLE_SERVER(3)
Impressum