fdZddlmZddlZddlZddlmZmZmZm Z m Z ddl m Z ddl mZmZmZddlmZmZddlmZdd lmZmZdd lmZdd lmZmZGd d Zy)z&Represent MongoClient's configuration.) annotationsN)Any CollectionOptionalTypeUnion)ObjectId)commonmonitorpool)LOCAL_THRESHOLD_MSSERVER_SELECTION_TIMEOUT)ConfigurationError)Pool PoolOptions)ServerDescription) TOPOLOGY_TYPE_ServerSelectorceZdZddddddeeej ddddejdejf ddZ e ddZ e ddZ e ddZ e ddZe dd Ze dd Ze dd Ze dd Ze dd Ze ddZe ddZe d dZe d dZe d!dZe ddZe d!dZddZd"dZy)#TopologySettingsNFrcN| tjkr tdtjdzfz|xsdg|_||_|xst j |_|xs t|_ |xstj|_ |xstj|_||_||_| |_| |_| |_| |_| |_||_|xsd|_||_t5|_dj9t;j<|_y)zyRepresent MongoClient's configuration. Take a list of (host, port) pairs and optional replica set name. z+heartbeatFrequencyMS cannot be less than %di) localhostiirN) r MIN_HEARTBEAT_INTERVALr_seeds_replica_set_namer r _pool_classr _pool_optionsr Monitor_monitor_class threading Condition_condition_class_local_threshold_ms_server_selection_timeout_server_selector_fqdn_heartbeat_frequency_direct_load_balanced_srv_service_name_srv_max_hosts_server_monitoring_moder _topology_idjoin traceback format_stack_stack)selfseedsreplica_set_name pool_class pool_options monitor_classcondition_classlocal_threshold_msserver_selection_timeoutheartbeat_frequencyserver_selectorfqdndirect_connection load_balancedsrv_service_name srv_max_hostsserver_monitoring_modes Y/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/pymongo/settings.py__init__zTopologySettings.__init__ s. !>!> >$=00479:  493R=QTYY*6*G+-5B5Ugoo;J;aiNaNa#5 )A& / $7!( +!1+0q'=$$Jggi4467 c|jS)zList of server addresses.)rr3s rDr4zTopologySettings.seedsSs{{rFc|jSN)rrHs rDr5z!TopologySettings.replica_set_nameXs%%%rFc|jSrJ)rrHs rDr6zTopologySettings.pool_class\srFc|jSrJ)rrHs rDr7zTopologySettings.pool_options`s!!!rFc|jSrJ)r rHs rDr8zTopologySettings.monitor_classds"""rFc|jSrJ)r#rHs rDr9z TopologySettings.condition_classh$$$rFc|jSrJ)r$rHs rDr:z#TopologySettings.local_threshold_msls'''rFc|jSrJ)r%rHs rDr;z)TopologySettings.server_selection_timeoutps---rFc|jSrJ)r&rHs rDr=z TopologySettings.server_selectortrOrFc|jSrJ)r(rHs rDr<z$TopologySettings.heartbeat_frequencyxs(((rFc|jSrJ)r'rHs rDr>zTopologySettings.fqdn|s zzrFc|jS)zConnect directly to a single server, or use a set of servers? True if there is one seed and no replica_set_name. )r)rHs rDdirectzTopologySettings.directs ||rFc|jS)z@True if the client was configured to connect to a load balancer.)r*rHs rDr@zTopologySettings.load_balanced"""rFc|jS)zThe srvServiceName.)r+rHs rDrAz!TopologySettings.srv_service_names%%%rFc|jS)zThe srvMaxHosts.)r,rHs rDrBzTopologySettings.srv_max_hostsrXrFc|jS)zThe serverMonitoringMode.)r-rHs rDrCz'TopologySettings.server_monitoring_modes+++rFc|jrtjS|jrtjS|j tj StjSrJ)r@r LoadBalancedrVSingler5ReplicaSetNoPrimaryUnknownrHs rDget_topology_typez"TopologySettings.get_topology_typesN    -- - [[ '' '  " " . 44 4 (( (rFcT|jDcic]}|t|c}Scc}w)z;Initial dict of (address, ServerDescription) for all seeds.)r4r)r3addresss rDget_server_descriptionsz(TopologySettings.get_server_descriptionss%CG::N*733NNNs%) r4z%Optional[Collection[tuple[str, int]]]r5 Optional[str]r6zOptional[Type[Pool]]r7zOptional[PoolOptions]r8zOptional[Type[monitor.Monitor]]r9z#Optional[Type[threading.Condition]]r:intr;rfr<rfr=Optional[_ServerSelector]r>rer?Optional[bool]r@rhrAstrrBrfrCri)returnzCollection[tuple[str, int]])rjre)rjz Type[Pool])rjr)rjzType[monitor.Monitor])rjzType[threading.Condition])rjrf)rjrg)rjrh)rjri)rjz4dict[Union[tuple[str, int], Any], ServerDescription])__name__ __module__ __qualname__r rr HEARTBEAT_FREQUENCYSRV_SERVICE_NAMESERVER_MONITORING_MODErEpropertyr4r5r6r7r8r9r:r;r=r<r>rVr@rArBrCrardrFrDrrs58<*.+/.29=?C"4(@#)#=#=59",1(, & 7 7&,&C&C#18418(18) 18 , 18 7 18=18 18#&18!1831818*18&1818 !18"!$#18f&&  ""##%%((..%%))##&&##,,)OrFr)__doc__ __future__rr!r0typingrrrrr bson.objectidr pymongor r r pymongo.commonr rpymongo.errorsr pymongo.poolrrpymongo.server_descriptionrpymongo.topology_descriptionrrrrrrFrDr}s?-"99"))G-*8GIOIOrF