1MONGOC_TOPOLOGY_DESCRIPTION_HMAOSN_MGWoORnCIg_ToTADOBBPLOECL_OSDGErYRi_VvDEeERrS(C3R)IPTION_HAS_WRITABLE_SERVER(3)
2
3
4
6 mongoc_topology_description_has_writable_server - mongoc_topol‐
7 ogy_description_has_writable_server()
8
10 bool
11 mongoc_topology_description_has_writable_server (
12 mongoc_topology_description_t *td);
13
14 Determines if the topology has a writable server available, such as a
15 primary, mongos, or standalone. This function uses the driver's current
16 knowledge of the state of the MongoDB server or servers it is connected
17 to; it does no I/O and it does not block.
18
19 Use this function in a topology-changed callback registered with mon‐
20 goc_apm_set_topology_changed_cb. For historical reasons, the mon‐
21 goc_topology_description_t passed to the callback is a const pointer,
22 you must cast away const to pass the pointer to mongoc_topol‐
23 ogy_description_has_writable_server.
24
26 · td: A mongoc_topology_description_t.
27
29 True if there is a known writable server.
30
32 Introduction to Application Performance Monitoring
33
35 MongoDB, Inc
36
38 2017-present, MongoDB, Inc
39
40
41
42
431.13.1 MONGOJCa_nTO2P4O,LO2G0Y1_9DESCRIPTION_HAS_WRITABLE_SERVER(3)