+
    4O|jA ã                  óp  € R t ^ RIHt ^ RIt^ RIHtHt ^ RIHtH	t	H
t
HtHt ^ RIHt ^ RIHtHt ^ RIHtHt ^ RIHtHt ]'       d   ^ R	IHt ^ R
IHt ^ RIHt ]! RRe4      t]! . . . . . 4      t ! R R4      t ! R R]4      t  ! R R]4      t! ! R R]4      t" ! R R]4      t# ! R R]4      t$R R lt%R R lt&R R lt'R R  lt( ! R! R"4      t) ! R# R$])4      t* ! R% R&])4      t+ ! R' R(])4      t, ! R) R*4      t- ! R+ R,]-4      t. ! R- R.]-4      t/ ! R/ R0]-4      t0 ! R1 R2]-4      t1 ! R3 R44      t2 ! R5 R64      t3 ! R7 R84      t4 ! R9 R:]44      t5 ! R; R<]54      t6 ! R= R>]54      t7 ! R? R@]64      t8 ! RA RB]54      t9 ! RC RD]44      t: ! RE RF]64      t; ! RG RH]64      t< ! RI RJ]54      t= ! RK RL4      t> ! RM RN]>4      t? ! RO RP]>4      t@ ! RQ RR]>4      tA ! RS RT4      tB ! RU RV]B4      tC ! RW RX]B4      tD ! RY RZ]B4      tE ! R[ R\4      tF ! R] R^]F4      tG ! R_ R`]F4      tH ! Ra Rb]F4      tI ! Rc Rd4      tJR# )fa  Tools to monitor driver events.

.. versionadded:: 3.1

.. attention:: Starting in PyMongo 3.11, the monitoring classes outlined below
    are included in the PyMongo distribution under the
    :mod:`~pymongo.event_loggers` submodule.

.. seealso:: This module is compatible with both the synchronous and asynchronous PyMongo APIs.


Use :func:`register` to register global listeners for specific events.
Listeners must inherit from one of the abstract classes below and implement
the correct functions for that class.

For example, a simple command logger might be implemented like this::

    import logging

    from pymongo import monitoring

    class CommandLogger(monitoring.CommandListener):

        def started(self, event):
            logging.info("Command {0.command_name} with request id "
                         "{0.request_id} started on server "
                         "{0.connection_id}".format(event))

        def succeeded(self, event):
            logging.info("Command {0.command_name} with request id "
                         "{0.request_id} on server {0.connection_id} "
                         "succeeded in {0.duration_micros} "
                         "microseconds".format(event))

        def failed(self, event):
            logging.info("Command {0.command_name} with request id "
                         "{0.request_id} on server {0.connection_id} "
                         "failed in {0.duration_micros} "
                         "microseconds".format(event))

    monitoring.register(CommandLogger())

Server discovery and monitoring events are also available. For example::

    class ServerLogger(monitoring.ServerListener):

        def opened(self, event):
            logging.info("Server {0.server_address} added to topology "
                         "{0.topology_id}".format(event))

        def description_changed(self, event):
            previous_server_type = event.previous_description.server_type
            new_server_type = event.new_description.server_type
            if new_server_type != previous_server_type:
                # server_type_name was added in PyMongo 3.4
                logging.info(
                    "Server {0.server_address} changed type from "
                    "{0.previous_description.server_type_name} to "
                    "{0.new_description.server_type_name}".format(event))

        def closed(self, event):
            logging.warning("Server {0.server_address} removed from topology "
                            "{0.topology_id}".format(event))


    class HeartbeatLogger(monitoring.ServerHeartbeatListener):

        def started(self, event):
            logging.info("Heartbeat sent to server "
                         "{0.connection_id}".format(event))

        def succeeded(self, event):
            # The reply.document attribute was added in PyMongo 3.4.
            logging.info("Heartbeat to server {0.connection_id} "
                         "succeeded with reply "
                         "{0.reply.document}".format(event))

        def failed(self, event):
            logging.warning("Heartbeat to server {0.connection_id} "
                            "failed with error {0.reply}".format(event))

    class TopologyLogger(monitoring.TopologyListener):

        def opened(self, event):
            logging.info("Topology with id {0.topology_id} "
                         "opened".format(event))

        def description_changed(self, event):
            logging.info("Topology description updated for "
                         "topology id {0.topology_id}".format(event))
            previous_topology_type = event.previous_description.topology_type
            new_topology_type = event.new_description.topology_type
            if new_topology_type != previous_topology_type:
                # topology_type_name was added in PyMongo 3.4
                logging.info(
                    "Topology {0.topology_id} changed type from "
                    "{0.previous_description.topology_type_name} to "
                    "{0.new_description.topology_type_name}".format(event))
            # The has_writable_server and has_readable_server methods
            # were added in PyMongo 3.4.
            if not event.new_description.has_writable_server():
                logging.warning("No writable servers available.")
            if not event.new_description.has_readable_server():
                logging.warning("No readable servers available.")

        def closed(self, event):
            logging.info("Topology with id {0.topology_id} "
                         "closed".format(event))

Connection monitoring and pooling events are also available. For example::

    class ConnectionPoolLogger(ConnectionPoolListener):

        def pool_created(self, event):
            logging.info("[pool {0.address}] pool created".format(event))

        def pool_ready(self, event):
            logging.info("[pool {0.address}] pool is ready".format(event))

        def pool_cleared(self, event):
            logging.info("[pool {0.address}] pool cleared".format(event))

        def pool_closed(self, event):
            logging.info("[pool {0.address}] pool closed".format(event))

        def connection_created(self, event):
            logging.info("[pool {0.address}][connection #{0.connection_id}] "
                         "connection created".format(event))

        def connection_ready(self, event):
            logging.info("[pool {0.address}][connection #{0.connection_id}] "
                         "connection setup succeeded".format(event))

        def connection_closed(self, event):
            logging.info("[pool {0.address}][connection #{0.connection_id}] "
                         "connection closed, reason: "
                         "{0.reason}".format(event))

        def connection_check_out_started(self, event):
            logging.info("[pool {0.address}] connection check out "
                         "started".format(event))

        def connection_check_out_failed(self, event):
            logging.info("[pool {0.address}] connection check out "
                         "failed, reason: {0.reason}".format(event))

        def connection_checked_out(self, event):
            logging.info("[pool {0.address}][connection #{0.connection_id}] "
                         "connection checked out of pool".format(event))

        def connection_checked_in(self, event):
            logging.info("[pool {0.address}][connection #{0.connection_id}] "
                         "connection checked into pool".format(event))


Event listeners can also be registered per instance of
:class:`~pymongo.mongo_client.MongoClient`::

    client = MongoClient(event_listeners=[CommandLogger()])

Note that previously registered global listeners are automatically included
when configuring per client event listeners. Registering a new global listener
will not add that listener to existing client instances.

.. note:: Events are delivered **synchronously**. Application threads block
  waiting for event handlers (e.g. :meth:`~CommandListener.started`) to
  return. Care must be taken to ensure that your event handlers are efficient
  enough to not adversely affect overall application performance.

.. warning:: The command documents published through this API are *not* copies.
  If you intend to modify them in any way you must copy them in your event
  handler first.
)ÚannotationsN)ÚabcÚ
namedtuple)ÚTYPE_CHECKINGÚAnyÚMappingÚOptionalÚSequence)ÚObjectId)ÚHelloÚHelloCompat)Ú_SENSITIVE_COMMANDSÚ_handle_exception)Ú_AddressÚ_DocumentOut)Ú	timedelta)ÚServerDescription)ÚTopologyDescriptionÚ
_Listenersc                  ó   € ] tR t^ÝtRtRtR# )Ú_EventListenerz,Abstract base class for all event listeners.© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    ÚKC:\Users\alokc\chatbot\backend\venv\Lib\site-packages\pymongo/monitoring.pyr   r   Ý   s   † Ý6r   r   c                  ó>   € ] tR t^átRtR R ltR R ltR R ltRtR	# )
ÚCommandListenerz~Abstract base class for command listeners.

Handles `CommandStartedEvent`, `CommandSucceededEvent`,
and `CommandFailedEvent`.
c               ó    € V ^8„  d   QhRRRR/# )é   ÚeventÚCommandStartedEventÚreturnÚNoner   )Úformats   "r   Ú__annotate__ÚCommandListener.__annotate__è   s   € ÷ "ñ "Ð0ð "°Tñ "r   c                ó   € \         h)zoAbstract method to handle a `CommandStartedEvent`.

:param event: An instance of :class:`CommandStartedEvent`.
©ÚNotImplementedError©Úselfr$   s   &&r   ÚstartedÚCommandListener.startedè   ó
   € ô
 "Ð!r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚCommandSucceededEventr&   r'   r   )r(   s   "r   r)   r*   ï   s   € ÷ "ñ "Ð4ð "¸ñ "r   c                ó   € \         h)zsAbstract method to handle a `CommandSucceededEvent`.

:param event: An instance of :class:`CommandSucceededEvent`.
r,   r.   s   &&r   Ú	succeededÚCommandListener.succeededï   r2   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚCommandFailedEventr&   r'   r   )r(   s   "r   r)   r*   ö   ó   € ÷ "ñ "Ð.ð "°4ñ "r   c                ó   € \         h)zmAbstract method to handle a `CommandFailedEvent`.

:param event: An instance of :class:`CommandFailedEvent`.
r,   r.   s   &&r   ÚfailedÚCommandListener.failedö   r2   r   r   N©	r   r   r   r   r   r0   r6   r<   r   r   r   r   r!   r!   á   s   † ñõ"õ"÷"ñ "r   r!   c                  óž   € ] tR t^þtRtR R ltR R ltR R ltR R	 ltR
 R lt	R R lt
R R ltR R ltR R ltR R ltR R ltRtR# )ÚConnectionPoolListenera  Abstract base class for connection pool listeners.

Handles all of the connection pool events defined in the Connection
Monitoring and Pooling Specification:
:class:`PoolCreatedEvent`, :class:`PoolClearedEvent`,
:class:`PoolClosedEvent`, :class:`ConnectionCreatedEvent`,
:class:`ConnectionReadyEvent`, :class:`ConnectionClosedEvent`,
:class:`ConnectionCheckOutStartedEvent`,
:class:`ConnectionCheckOutFailedEvent`,
:class:`ConnectionCheckedOutEvent`,
and :class:`ConnectionCheckedInEvent`.

.. versionadded:: 3.9
c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚPoolCreatedEventr&   r'   r   )r(   s   "r   r)   Ú#ConnectionPoolListener.__annotate__  ó   € ÷ "ñ "Ð"2ð "°tñ "r   c                ó   € \         h)zœAbstract method to handle a :class:`PoolCreatedEvent`.

Emitted when a connection Pool is created.

:param event: An instance of :class:`PoolCreatedEvent`.
r,   r.   s   &&r   Úpool_createdÚ#ConnectionPoolListener.pool_created  ó
   € ô "Ð!r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚPoolReadyEventr&   r'   r   )r(   s   "r   r)   rC     s   € ÷ 	"ñ 	" ð 	"°4ñ 	"r   c                ó   € \         h)z´Abstract method to handle a :class:`PoolReadyEvent`.

Emitted when a connection Pool is marked ready.

:param event: An instance of :class:`PoolReadyEvent`.

.. versionadded:: 4.0
r,   r.   s   &&r   Ú
pool_readyÚ!ConnectionPoolListener.pool_ready  s
   € ô "Ð!r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚPoolClearedEventr&   r'   r   )r(   s   "r   r)   rC   "  rD   r   c                ó   € \         h)z•Abstract method to handle a `PoolClearedEvent`.

Emitted when a connection Pool is cleared.

:param event: An instance of :class:`PoolClearedEvent`.
r,   r.   s   &&r   Úpool_clearedÚ#ConnectionPoolListener.pool_cleared"  rH   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚPoolClosedEventr&   r'   r   )r(   s   "r   r)   rC   +  s   € ÷ "ñ " ð "°Tñ "r   c                ó   € \         h)z’Abstract method to handle a `PoolClosedEvent`.

Emitted when a connection Pool is closed.

:param event: An instance of :class:`PoolClosedEvent`.
r,   r.   s   &&r   Úpool_closedÚ"ConnectionPoolListener.pool_closed+  rH   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚConnectionCreatedEventr&   r'   r   )r(   s   "r   r)   rC   4  s   € ÷ "ñ "Ð(>ð "À4ñ "r   c                ó   € \         h)z¹Abstract method to handle a :class:`ConnectionCreatedEvent`.

Emitted when a connection Pool creates a Connection object.

:param event: An instance of :class:`ConnectionCreatedEvent`.
r,   r.   s   &&r   Úconnection_createdÚ)ConnectionPoolListener.connection_created4  rH   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚConnectionReadyEventr&   r'   r   )r(   s   "r   r)   rC   =  s   € ÷ "ñ "Ð&:ð "¸tñ "r   c                ó   € \         h)zÄAbstract method to handle a :class:`ConnectionReadyEvent`.

Emitted when a connection has finished its setup, and is now ready to
use.

:param event: An instance of :class:`ConnectionReadyEvent`.
r,   r.   s   &&r   Úconnection_readyÚ'ConnectionPoolListener.connection_ready=  ó
   € ô "Ð!r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚConnectionClosedEventr&   r'   r   )r(   s   "r   r)   rC   G  s   € ÷ "ñ "Ð'<ð "Àñ "r   c                ó   € \         h)z¯Abstract method to handle a :class:`ConnectionClosedEvent`.

Emitted when a connection Pool closes a connection.

:param event: An instance of :class:`ConnectionClosedEvent`.
r,   r.   s   &&r   Úconnection_closedÚ(ConnectionPoolListener.connection_closedG  rH   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚConnectionCheckOutStartedEventr&   r'   r   )r(   s   "r   r)   rC   P  s   € ÷ "ñ "Ð2Pð "ÐUYñ "r   c                ó   € \         h)zÒAbstract method to handle a :class:`ConnectionCheckOutStartedEvent`.

Emitted when the driver starts attempting to check out a connection.

:param event: An instance of :class:`ConnectionCheckOutStartedEvent`.
r,   r.   s   &&r   Úconnection_check_out_startedÚ3ConnectionPoolListener.connection_check_out_startedP  rH   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚConnectionCheckOutFailedEventr&   r'   r   )r(   s   "r   r)   rC   Y  s   € ÷ "ñ "Ð1Nð "ÐSWñ "r   c                ó   € \         h)zÎAbstract method to handle a :class:`ConnectionCheckOutFailedEvent`.

Emitted when the driver's attempt to check out a connection fails.

:param event: An instance of :class:`ConnectionCheckOutFailedEvent`.
r,   r.   s   &&r   Úconnection_check_out_failedÚ2ConnectionPoolListener.connection_check_out_failedY  rH   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚConnectionCheckedOutEventr&   r'   r   )r(   s   "r   r)   rC   b  s   € ÷ "ñ "Ð,Eð "È$ñ "r   c                ó   € \         h)zÁAbstract method to handle a :class:`ConnectionCheckedOutEvent`.

Emitted when the driver successfully checks out a connection.

:param event: An instance of :class:`ConnectionCheckedOutEvent`.
r,   r.   s   &&r   Úconnection_checked_outÚ-ConnectionPoolListener.connection_checked_outb  rH   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚConnectionCheckedInEventr&   r'   r   )r(   s   "r   r)   rC   k  s   € ÷ "ñ "Ð+Cð "Èñ "r   c                ó   € \         h)zÍAbstract method to handle a :class:`ConnectionCheckedInEvent`.

Emitted when the driver checks in a connection back to the connection
Pool.

:param event: An instance of :class:`ConnectionCheckedInEvent`.
r,   r.   s   &&r   Úconnection_checked_inÚ,ConnectionPoolListener.connection_checked_ink  rb   r   r   N)r   r   r   r   r   rF   rL   rQ   rV   r[   r`   rf   rk   rp   ru   rz   r   r   r   r   r@   r@   þ   sC   † ñõ"õ	"õ"õ"õ"õ"õ"õ"õ"õ"÷"ñ "r   r@   c                  ó>   € ] tR tRtRtR R ltR R ltR R ltR	tR
# )ÚServerHeartbeatListeneriv  z¶Abstract base class for server heartbeat listeners.

Handles `ServerHeartbeatStartedEvent`, `ServerHeartbeatSucceededEvent`,
and `ServerHeartbeatFailedEvent`.

.. versionadded:: 3.3
c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚServerHeartbeatStartedEventr&   r'   r   )r(   s   "r   r)   Ú$ServerHeartbeatListener.__annotate__  s   € ÷ "ñ "Ð8ð "¸Tñ "r   c                ó   € \         h)zAbstract method to handle a `ServerHeartbeatStartedEvent`.

:param event: An instance of :class:`ServerHeartbeatStartedEvent`.
r,   r.   s   &&r   r0   ÚServerHeartbeatListener.started  r2   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚServerHeartbeatSucceededEventr&   r'   r   )r(   s   "r   r)   r€   †  s   € ÷ "ñ "Ð<ð "Àñ "r   c                ó   € \         h)zƒAbstract method to handle a `ServerHeartbeatSucceededEvent`.

:param event: An instance of :class:`ServerHeartbeatSucceededEvent`.
r,   r.   s   &&r   r6   Ú!ServerHeartbeatListener.succeeded†  r2   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚServerHeartbeatFailedEventr&   r'   r   )r(   s   "r   r)   r€   �  s   € ÷ "ñ "Ð6ð "¸4ñ "r   c                ó   € \         h)z}Abstract method to handle a `ServerHeartbeatFailedEvent`.

:param event: An instance of :class:`ServerHeartbeatFailedEvent`.
r,   r.   s   &&r   r<   ÚServerHeartbeatListener.failed�  r2   r   r   Nr>   r   r   r   r}   r}   v  s   † ñõ"õ"÷"ñ "r   r}   c                  ó>   € ] tR tRtRtR R ltR R ltR R ltR	tR
# )ÚTopologyListeneri•  z«Abstract base class for topology monitoring listeners.
Handles `TopologyOpenedEvent`, `TopologyDescriptionChangedEvent`, and
`TopologyClosedEvent`.

.. versionadded:: 3.3
c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚTopologyOpenedEventr&   r'   r   )r(   s   "r   r)   ÚTopologyListener.__annotate__�  ó   € ÷ "ñ "Ð/ð "°Dñ "r   c                ó   € \         h)zoAbstract method to handle a `TopologyOpenedEvent`.

:param event: An instance of :class:`TopologyOpenedEvent`.
r,   r.   s   &&r   ÚopenedÚTopologyListener.opened�  r2   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚTopologyDescriptionChangedEventr&   r'   r   )r(   s   "r   r)   r�   ¤  s   € ÷ "ñ "Ð)Hð "ÈTñ "r   c                ó   € \         h)z‡Abstract method to handle a `TopologyDescriptionChangedEvent`.

:param event: An instance of :class:`TopologyDescriptionChangedEvent`.
r,   r.   s   &&r   Údescription_changedÚ$TopologyListener.description_changed¤  r2   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚTopologyClosedEventr&   r'   r   )r(   s   "r   r)   r�   «  r�   r   c                ó   € \         h)zoAbstract method to handle a `TopologyClosedEvent`.

:param event: An instance of :class:`TopologyClosedEvent`.
r,   r.   s   &&r   ÚclosedÚTopologyListener.closed«  r2   r   r   N©	r   r   r   r   r   r’   r—   rœ   r   r   r   r   rŒ   rŒ   •  ó   † ñõ"õ"÷"ñ "r   rŒ   c                  ó>   € ] tR tRtRtR R ltR R ltR R ltR	tR
# )ÚServerListeneri³  z™Abstract base class for server listeners.
Handles `ServerOpeningEvent`, `ServerDescriptionChangedEvent`, and
`ServerClosedEvent`.

.. versionadded:: 3.3
c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚServerOpeningEventr&   r'   r   )r(   s   "r   r)   ÚServerListener.__annotate__»  r:   r   c                ó   € \         h)zmAbstract method to handle a `ServerOpeningEvent`.

:param event: An instance of :class:`ServerOpeningEvent`.
r,   r.   s   &&r   r’   ÚServerListener.opened»  r2   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚServerDescriptionChangedEventr&   r'   r   )r(   s   "r   r)   r¤   Â  s   € ÷ "ñ "Ð)Fð "È4ñ "r   c                ó   € \         h)zƒAbstract method to handle a `ServerDescriptionChangedEvent`.

:param event: An instance of :class:`ServerDescriptionChangedEvent`.
r,   r.   s   &&r   r—   Ú"ServerListener.description_changedÂ  r2   r   c               ó    € V ^8„  d   QhRRRR/# )r#   r$   ÚServerClosedEventr&   r'   r   )r(   s   "r   r)   r¤   É  s   € ÷ "ñ "Ð-ð "°$ñ "r   c                ó   € \         h)zkAbstract method to handle a `ServerClosedEvent`.

:param event: An instance of :class:`ServerClosedEvent`.
r,   r.   s   &&r   rœ   ÚServerListener.closedÉ  r2   r   r   Nrž   r   r   r   r¡   r¡   ³  rŸ   r   r¡   c               ó    € V ^8„  d   QhRRRR/# )r#   Údurr   r&   Úintr   )r(   s   "r   r)   r)   Ñ  s   € ÷ +ñ +�Ið + #ñ +r   c                óB   € \        V P                  4       R,          4      # )z'Convert duration 'dur' to microseconds.g    €„.A)r±   Útotal_seconds)r°   s   &r   Ú
_to_microsr´   Ñ  s   € äˆs× Ñ Ó" TÕ)Ó*Ð*r   c               ó$   € V ^8„  d   QhRRRRRR/# )r#   ÚoptionÚstrÚ	listenerszSequence[_EventListeners]r&   r   )r(   s   "r   r)   r)   Ö  s$   € ÷ ñ ØðØ5ðàñr   c           	     óê   € \        V\        P                  4      '       g   \        V  R\	        V4       24      hV F3  p\        V\
        4      '       d   K  \        RV  R\	        V4       24      h	  V# )zValidate event listenersz must be a list or tuple, not úListeners for ú| must be either a CommandListener, ServerHeartbeatListener, ServerListener, TopologyListener, or ConnectionPoolListener,not )Ú
isinstancer   r	   Ú	TypeErrorÚtyper   )r¶   r¸   Úlisteners   && r   Ú_validate_event_listenersrÀ   Ö  sz   € ô �i¤§¡×.Ò.Ü˜6˜(Ð"@ÄÀiÃÐ@QÐRÓSÐSÛˆÜ˜(¤N×3Ô3ÜØ   ð )ô ˜H“~Ð&ð	(óð ñ ð Ðr   c               ó    € V ^8„  d   QhRRRR/# )r#   r¿   r   r&   r'   r   )r(   s   "r   r)   r)   è  s   € ÷ 3ñ 3�~ð 3¨$ñ 3r   c                ó|  € \        V \        4      '       g   \        RV  R\        V 4       24      h\        V \        4      '       d    \
        P                  P                  V 4       \        V \        4      '       d    \
        P                  P                  V 4       \        V \        4      '       d    \
        P                  P                  V 4       \        V \        4      '       d    \
        P                  P                  V 4       \        V \        4      '       d"   \
        P                  P                  V 4       R# R# )zàRegister a global event listener.

:param listener: A subclasses of :class:`CommandListener`,
    :class:`ServerHeartbeatListener`, :class:`ServerListener`,
    :class:`TopologyListener`, or :class:`ConnectionPoolListener`.
rº   r»   N)r¼   r   r½   r¾   r!   Ú
_LISTENERSÚcommand_listenersÚappendr}   Úserver_heartbeat_listenersr¡   Úserver_listenersrŒ   Útopology_listenersr@   Úcmap_listeners)r¿   s   &r   ÚregisterrÊ   è  sê   € ô �h¤×/Ò/ÜØ˜X˜Jð 'ô ˜“>Ð"ð	$ó
ð 	
ô �(œO×,Ò,Ü×$Ñ$×+Ñ+¨HÔ5Ü�(Ô3×4Ò4Ü×-Ñ-×4Ñ4°XÔ>Ü�(œN×+Ò+Ü×#Ñ#×*Ñ*¨8Ô4Ü�(Ô,×-Ò-Ü×%Ñ%×,Ñ,¨XÔ6Ü�(Ô2×3Ò3Ü×!Ñ!×(Ñ(¨Ö2ñ 4r   c               ó$   € V ^8„  d   QhRRRRRR/# )r#   Úcommand_namer·   ÚdoczMapping[str, Any]r&   Úboolr   )r(   s   "r   r)   r)     s"   € ÷ ñ ¨sð Ð9Jð Ètñ r   c                ób   € V P                  4       R \        P                  39   d
   RV9   d   R# R# )ÚhelloÚspeculativeAuthenticateTF)Úlowerr   Ú
LEGACY_CMD)rÌ   rÍ   s   &&r   Ú_is_speculative_authenticaterÔ     s,   € à×ÑÓ ¬+×*@Ñ*@Ð AÔAØ%¨Ô,áÙr   c                  óÈ   € ] tR tRtRtRtRR R llt]R R l4       t]R R	 l4       t	]R
 R l4       t
]R R l4       t]R R l4       t]R R l4       t]R R l4       tRtR# )Ú_CommandEventi  zBase class for command events.Nc               ó8   € V ^8„  d   QhRRRRRRRRR	R
RRRRRR/# )r#   rÌ   r·   Ú
request_idr±   Úconnection_idr   Úoperation_idúOptional[int]Ú
service_idúOptional[ObjectId]Údatabase_nameÚserver_connection_idr&   r'   r   )r(   s   "r   r)   Ú_CommandEvent.__annotate__  sZ   € ÷ 5ñ 5àð5ð ð5ð  ð	5ð
 $ð5ð 'ð5ð ð5ð ,ð5ð 
ñ5r   c                	óZ   € Wn         W n        W0n        W@n        WPn        W`n        Wpn        R # ©N)Ú_CommandEvent__cmd_nameÚ_CommandEvent__rqst_idÚ_CommandEvent__conn_idÚ_CommandEvent__op_idÚ_CommandEvent__service_idÚ_CommandEvent__dbÚ_CommandEvent__server_conn_id)r/   rÌ   rØ   rÙ   rÚ   rÜ   rÞ   rß   s   &&&&&&&&r   Ú__init__Ú_CommandEvent.__init__  s)   € ð 'ŒØ#ŒØ&ŒØ#ŒØ&ÔØ!Œ	Ø 4Ör   c               ó   € V ^8„  d   QhRR/# ©r#   r&   r·   r   )r(   s   "r   r)   rà   .  s   € ÷ ñ ˜cñ r   c                ó   € V P                   # )zThe command name.)rã   ©r/   s   &r   rÌ   Ú_CommandEvent.command_name-  ó   € ð �‰Ðr   c               ó   € V ^8„  d   QhRR/# ©r#   r&   r±   r   )r(   s   "r   r)   rà   3  s   € ÷ ñ ˜Cñ r   c                ó   € V P                   # )z"The request id for this operation.)rä   rï   s   &r   rØ   Ú_CommandEvent.request_id2  ó   € ð �~‰~Ðr   c               ó   € V ^8„  d   QhRR/# ©r#   r&   r   r   )r(   s   "r   r)   rà   8  s   € ÷ ñ ˜xñ r   c                ó   € V P                   # )z@The address (host, port) of the server this command was sent to.)rå   rï   s   &r   rÙ   Ú_CommandEvent.connection_id7  rö   r   c               ó   € V ^8„  d   QhRR/# ©r#   r&   rÝ   r   )r(   s   "r   r)   rà   =  s   € ÷ !ñ !Ð.ñ !r   c                ó   € V P                   # )zNThe service_id this command was sent to, or ``None``.

.. versionadded:: 3.12
)rç   rï   s   &r   rÜ   Ú_CommandEvent.service_id<  s   € ð × Ñ Ð r   c               ó   € V ^8„  d   QhRR/# ©r#   r&   rÛ   r   )r(   s   "r   r)   rà   E  s   € ÷ ñ ˜mñ r   c                ó   € V P                   # )z(An id for this series of events or None.)ræ   rï   s   &r   rÚ   Ú_CommandEvent.operation_idD  ó   € ð �|‰|Ðr   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   rà   J  s   € ÷ ñ ˜sñ r   c                ó   € V P                   # )zNThe database_name this command was sent to, or ``""``.

.. versionadded:: 4.6
)rè   rï   s   &r   rÞ   Ú_CommandEvent.database_nameI  s   € ð �y‰yÐr   c               ó   € V ^8„  d   QhRR/# r   r   )r(   s   "r   r)   rà   R  s   € ÷ %ñ % mñ %r   c                ó   € V P                   # )zoThe server-side connection id for the connection this command was sent on, or ``None``.

.. versionadded:: 4.7
)ré   rï   s   &r   rß   Ú"_CommandEvent.server_connection_idQ  s   € ð ×$Ñ$Ð$r   )Ú
__cmd_nameÚ	__conn_idÚ__dbÚ__op_idÚ	__rqst_idÚ__server_conn_idÚ__service_id)r
  r  r  r  r  r  r  ©NÚ N)r   r   r   r   r   Ú	__slots__rê   ÚpropertyrÌ   rØ   rÙ   rÜ   rÚ   rÞ   rß   r   r   r   r   rÖ   rÖ     s�   † Ù(ð€I÷5ð$ ôó ðð ôó ðð ôó ðð ô!ó ð!ð ôó ðð ôó ðð ô%ó ô%r   rÖ   c                  óx   a € ] tR tRtRtRtRR V 3R lllt]R R l4       t]R V 3R ll4       t	R	 R
 lt
RtV ;t# )r%   iZ  aÁ  Event published when a command starts.

:param command: The command document.
:param database_name: The name of the database this command was run against.
:param request_id: The request id for this operation.
:param connection_id: The address (host, port) of the server this command
    was sent to.
:param operation_id: An optional identifier for a series of related events.
:param service_id: The service_id this command was sent to, or ``None``.
c               ó8   € V ^8„  d   QhRRRRRRRRR	R
RRRR
RR/# )r#   Úcommandr   rÞ   r·   rØ   r±   rÙ   r   rÚ   rÛ   rÜ   rÝ   rß   r&   r'   r   )r(   s   "r   r)   Ú CommandStartedEvent.__annotate__h  sZ   € ÷ !ñ !àð!ð ð!ð ð	!ð
  ð!ð $ð!ð 'ð!ð ,ð!ð 
ñ!r   c           
     	ó   <€ V'       g   \        V: R 24      h\        \        V4      4      p\        S
V `  VVVVVVVR7       VP                  4       p	V	\        9   g   \        W‘4      '       d
   / V n        R# Wn        R# )z is not a valid command©rÜ   rÞ   rß   N)	Ú
ValueErrorÚnextÚiterÚsuperrê   rÒ   r   rÔ   Ú_CommandStartedEvent__cmd)r/   r  rÞ   rØ   rÙ   rÚ   rÜ   rß   rÌ   Úcmd_nameÚ	__class__s   &&&&&&&&  €r   rê   ÚCommandStartedEvent.__init__h  s€   ø€ ÷ Ü ™{Ð*AÐBÓCÐCäœD ›MÓ*ˆÜ‰ÑØØØØØ!Ø'Ø!5ð 	ô 	
ð  ×%Ñ%Ó'ˆØÔ*Ô*Ô.JÈ8×.]Ò.]Ø')ˆDŽJà ŽJr   c               ó   € V ^8„  d   QhRR/# ©r#   r&   r   r   )r(   s   "r   r)   r  †  s   € ÷ ñ ˜ñ r   c                ó   € V P                   # )zThe command document.)r  rï   s   &r   r  ÚCommandStartedEvent.command…  s   € ð �z‰zÐr   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   r  ‹  s   € ÷ %ñ %˜sñ %r   c                ó   <€ \         SV `  # )z6The name of the database this command was run against.)r  rÞ   ©r/   r!  s   &€r   rÞ   Ú!CommandStartedEvent.database_nameŠ  s   ø€ ô ‰wÑ$Ð$r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   r  �  s   € ÷ 
ñ 
˜#ñ 
r   c           	     	óÐ   € R P                  V P                  P                  V P                  V P                  V P
                  V P                  V P                  V P                  4      # )z[<{} {} db: {!r}, command: {!r}, operation_id: {}, service_id: {}, server_connection_id: {}>)	r(   r!  r   rÙ   rÞ   rÌ   rÚ   rÜ   rß   rï   s   &r   Ú__repr__ÚCommandStartedEvent.__repr__�  sU   € àiß
‰&Ø�N‰N×#Ñ#Ø×ÑØ×ÑØ×ÑØ×ÑØ�O‰OØ×%Ñ%ó
ð
	
r   )Ú__cmd©NN)r   r   r   r   r   r  rê   r  r  rÞ   r-  r   Ú__classcell__©r!  s   @r   r%   r%   Z  sK   ø† ñ	ð €I÷!ò !ð: ôó ðð ÷%ó ð%÷
ó 
r   r%   c                  ór   a € ] tR tRtRtRtRR V 3R lllt]R R l4       t]R R l4       t	R	 R
 lt
RtV ;t# )r4   i�  a'  Event published when a command succeeds.

:param duration: The command duration as a datetime.timedelta.
:param reply: The server reply document.
:param command_name: The command name.
:param request_id: The request id for this operation.
:param connection_id: The address (host, port) of the server this command
    was sent to.
:param operation_id: An optional identifier for a series of related events.
:param service_id: The service_id this command was sent to, or ``None``.
:param database_name: The database this command was sent to, or ``""``.
c               ó@   € V ^8„  d   QhRRRRRRRRR	R
RRRRRRRRRR/
# )r#   Údurationúdatetime.timedeltaÚreplyr   rÌ   r·   rØ   r±   rÙ   r   rÚ   rÛ   rÜ   rÝ   rÞ   rß   r&   r'   r   )r(   s   "r   r)   Ú"CommandSucceededEvent.__annotate__­  sn   € ÷ !ñ !à$ð!ð ð!ð ð	!ð
 ð!ð  ð!ð $ð!ð 'ð!ð ð!ð ,ð!ð 
ñ!r   c
           
     	óÊ   <€ \         SV `  VVVVVVV	R 7       \        V4      V n        VP	                  4       p
V
\
        9   g   \        W¢4      '       d
   / V n        R# W n        R# ©r  N)r  rê   r´   Ú'_CommandSucceededEvent__duration_microsrÒ   r   rÔ   Ú_CommandSucceededEvent__reply)r/   r5  r7  rÌ   rØ   rÙ   rÚ   rÜ   rÞ   rß   r   r!  s   &&&&&&&&&& €r   rê   ÚCommandSucceededEvent.__init__­  si   ø€ ô 	‰ÑØØØØØ!Ø'Ø!5ð 	ô 	
ô ",¨HÓ!5ˆÔØ×%Ñ%Ó'ˆØÔ*Ô*Ô.JÈ8×.[Ò.[Ø)+ˆDŽLà ŽLr   c               ó   € V ^8„  d   QhRR/# ró   r   )r(   s   "r   r)   r8  Ê  ó   € ÷ &ñ & ñ &r   c                ó   € V P                   # ©z/The duration of this operation in microseconds.)r;  rï   s   &r   Úduration_microsÚ%CommandSucceededEvent.duration_microsÉ  ó   € ð ×%Ñ%Ð%r   c               ó   € V ^8„  d   QhRR/# r$  r   )r(   s   "r   r)   r8  Ï  s   € ÷ ñ �|ñ r   c                ó   € V P                   # ©z/The server failure document for this operation.)r<  rï   s   &r   r7  ÚCommandSucceededEvent.replyÎ  r  r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   r8  Ó  s   € ÷ 
ñ 
˜#ñ 
r   c           
     	óæ   € R P                  V P                  P                  V P                  V P                  V P
                  V P                  V P                  V P                  V P                  4      # )zp<{} {} db: {!r}, command: {!r}, operation_id: {}, duration_micros: {}, service_id: {}, server_connection_id: {}>)
r(   r!  r   rÙ   rÞ   rÌ   rÚ   rB  rÜ   rß   rï   s   &r   r-  ÚCommandSucceededEvent.__repr__Ó  s^   € à~ß
‰&Ø�N‰N×#Ñ#Ø×ÑØ×ÑØ×ÑØ×ÑØ× Ñ Ø�O‰OØ×%Ñ%ó	
ð	
r   )Ú__duration_microsÚ__replyr  )r   r   r   r   r   r  rê   r  rB  r7  r-  r   r1  r2  s   @r   r4   r4   �  sK   ø† ñð 1€I÷!ò !ð8 ô&ó ð&ð ôó ð÷
ó 
r   r4   c                  ór   a € ] tR tRtRtRtRR V 3R lllt]R R l4       t]R R l4       t	R	 R
 lt
RtV ;t# )r9   iâ  a&  Event published when a command fails.

:param duration: The command duration as a datetime.timedelta.
:param failure: The server reply document.
:param command_name: The command name.
:param request_id: The request id for this operation.
:param connection_id: The address (host, port) of the server this command
    was sent to.
:param operation_id: An optional identifier for a series of related events.
:param service_id: The service_id this command was sent to, or ``None``.
:param database_name: The database this command was sent to, or ``""``.
c               ó@   € V ^8„  d   QhRRRRRRRRR	R
RRRRRRRRRR/
# )r#   r5  r6  Úfailurer   rÌ   r·   rØ   r±   rÙ   r   rÚ   rÛ   rÜ   rÝ   rÞ   rß   r&   r'   r   )r(   s   "r   r)   ÚCommandFailedEvent.__annotate__ò  sn   € ÷ !ñ !à$ð!ð ð!ð ð	!ð
 ð!ð  ð!ð $ð!ð 'ð!ð ð!ð ,ð!ð 
ñ!r   c
           
     	ó`   <€ \         S
V `  VVVVVVV	R 7       \        V4      V n        W n        R# r:  )r  rê   r´   Ú$_CommandFailedEvent__duration_microsÚ_CommandFailedEvent__failure)r/   r5  rP  rÌ   rØ   rÙ   rÚ   rÜ   rÞ   rß   r!  s   &&&&&&&&&&€r   rê   ÚCommandFailedEvent.__init__ò  s@   ø€ ô 	‰ÑØØØØØ!Ø'Ø!5ð 	ô 	
ô ",¨HÓ!5ˆÔØ Žr   c               ó   € V ^8„  d   QhRR/# ró   r   )r(   s   "r   r)   rQ    r?  r   c                ó   € V P                   # rA  )rS  rï   s   &r   rB  Ú"CommandFailedEvent.duration_micros
  rD  r   c               ó   € V ^8„  d   QhRR/# r$  r   )r(   s   "r   r)   rQ    s   € ÷ ñ ˜ñ r   c                ó   € V P                   # rG  )rT  rï   s   &r   rP  ÚCommandFailedEvent.failure  rö   r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   rQ    s   € ÷ 
ñ 
˜#ñ 
r   c                	óü   € R P                  V P                  P                  V P                  V P                  V P
                  V P                  V P                  V P                  V P                  V P                  4	      # )z<{} {} db: {!r}, command: {!r}, operation_id: {}, duration_micros: {}, failure: {!r}, service_id: {}, server_connection_id: {}>)r(   r!  r   rÙ   rÞ   rÌ   rÚ   rB  rP  rÜ   rß   rï   s   &r   r-  ÚCommandFailedEvent.__repr__  sh   € ðGç
‰&Ø�N‰N×#Ñ#Ø×ÑØ×ÑØ×ÑØ×ÑØ× Ñ Ø�L‰LØ�O‰OØ×%Ñ%ó

ð	
r   )rL  Ú	__failurer  )r   r   r   r   r   r  rê   r  rB  rP  r-  r   r1  r2  s   @r   r9   r9   â  sK   ø† ñð 3€I÷!ò !ð0 ô&ó ð&ð ôó ð÷
ó 
r   r9   c                  óL   € ] tR tRtRtR	tR R lt]R R l4       tR R lt	R	t
R
# )Ú
_PoolEventi%  zBase class for pool events.c               ó    € V ^8„  d   QhRRRR/# ©r#   Úaddressr   r&   r'   r   )r(   s   "r   r)   Ú_PoolEvent.__annotate__*  ó   € ÷ !ñ ! ð !¨Tñ !r   c                	ó   € Wn         R # râ   ©Ú_PoolEvent__address©r/   rd  s   &&r   rê   Ú_PoolEvent.__init__*  ó   € Ø Žr   c               ó   € V ^8„  d   QhRR/# rø   r   )r(   s   "r   r)   re  .  ó   € ÷ ñ ˜ñ r   c                ó   € V P                   # )zRThe address (host, port) pair of the server the pool is attempting
to connect to.
rh  rï   s   &r   rd  Ú_PoolEvent.address-  ó   € ð
 �~‰~Ðr   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   re  4  ó   € ÷ @ñ @˜#ñ @r   c                	óP   € V P                   P                   R V P                  : R2# ©Ú(Ú))r!  r   ri  rï   s   &r   r-  Ú_PoolEvent.__repr__4  ó%   € Ø—.‘.×)Ñ)Ð*¨!¨D¯N©NÑ+=¸QÐ?Ð?r   ©Ú	__addressN©r   r   r   r   r   r  rê   r  rd  r-  r   r   r   r   ra  ra  %  s/   † Ù%à€Iõ!ð ôó ð÷@ñ @r   ra  c                  óX   a € ] tR tRtRtR	tR V 3R llt]R R l4       tR R lt	R	t
V ;t# )
rB   i8  z«Published when a Connection Pool is created.

:param address: The address (host, port) pair of the server this Pool is
   attempting to connect to.

.. versionadded:: 3.9
c               ó$   € V ^8„  d   QhRRRRRR/# ©r#   rd  r   Úoptionsúdict[str, Any]r&   r'   r   )r(   s   "r   r)   ÚPoolCreatedEvent.__annotate__C  s!   € ÷ !ñ ! ð !°>ð !Àdñ !r   c                	ó2   <€ \         SV `  V4       W n        R # râ   )r  rê   Ú_PoolCreatedEvent__options)r/   rd  r€  r!  s   &&&€r   rê   ÚPoolCreatedEvent.__init__C  s   ø€ Ü‰Ñ˜Ô!Ø Žr   c               ó   € V ^8„  d   QhRR/# )r#   r&   r�  r   )r(   s   "r   r)   r‚  H  s   € ÷ ñ ˜ñ r   c                ó   € V P                   # )zCAny non-default pool options that were set on this Connection Pool.)r„  rï   s   &r   r€  ÚPoolCreatedEvent.optionsG  rö   r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   r‚  L  s   € ÷ Rñ R˜#ñ Rr   c                	ól   € V P                   P                   R V P                  : RV P                  : R2# ©rv  z, rw  )r!  r   rd  r„  rï   s   &r   r-  ÚPoolCreatedEvent.__repr__L  s0   € Ø—.‘.×)Ñ)Ð*¨!¨D¯L©LÑ+;¸2¸d¿n¹nÑ=OÈqÐQÐQr   )Ú	__options)r   r   r   r   r   r  rê   r  r€  r-  r   r1  r2  s   @r   rB   rB   8  s9   ø† ñð €I÷!ð !ð ôó ð÷Ró Rr   rB   c                  ó   € ] tR tRtRtRtRtR# )rJ   iP  z°Published when a Connection Pool is marked ready.

:param address: The address (host, port) pair of the server this Pool is
   attempting to connect to.

.. versionadded:: 4.0
r   N©r   r   r   r   r   r  r   r   r   r   rJ   rJ   P  ó   † ñð „Ir   rJ   c                  ór   a € ] tR tRtRtRtRR V 3R lllt]R R l4       t]R R l4       t	R	 R
 lt
RtV ;t# )rO   i\  a_  Published when a Connection Pool is cleared.

:param address: The address (host, port) pair of the server this Pool is
   attempting to connect to.
:param service_id: The service_id this command was sent to, or ``None``.
:param interrupt_connections: True if all active connections were interrupted by the Pool during clearing.

.. versionadded:: 3.9
c               ó(   € V ^8„  d   QhRRRRRRRR/# ©	r#   rd  r   rÜ   rÝ   Úinterrupt_connectionsrÎ   r&   r'   r   )r(   s   "r   r)   ÚPoolClearedEvent.__annotate__i  s2   € ÷ =ñ =àð=ð 'ð=ð  $ð	=ð
 
ñ=r   c                	ó>   <€ \         SV `  V4       W n        W0n        R # râ   )r  rê   Ú_PoolClearedEvent__service_idÚ(_PoolClearedEvent__interrupt_connections)r/   rd  rÜ   r”  r!  s   &&&&€r   rê   ÚPoolClearedEvent.__init__i  s   ø€ ô 	‰Ñ˜Ô!Ø&ÔØ'<Ö$r   c               ó   € V ^8„  d   QhRR/# rü   r   )r(   s   "r   r)   r•  t  s   € ÷ !ñ !Ð.ñ !r   c                ó   € V P                   # )z�Connections with this service_id are cleared.

When service_id is ``None``, all connections in the pool are cleared.

.. versionadded:: 3.12
)r—  rï   s   &r   rÜ   ÚPoolClearedEvent.service_ids  s   € ð × Ñ Ð r   c               ó   € V ^8„  d   QhRR/# ©r#   r&   rÎ   r   )r(   s   "r   r)   r•  ~  s   € ÷ ,ñ , tñ ,r   c                ó   € V P                   # )zTIf True, active connections are interrupted during clearing.

.. versionadded:: 4.7
)r˜  rï   s   &r   r”  Ú&PoolClearedEvent.interrupt_connections}  s   € ð ×+Ñ+Ð+r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   r•  …  s   € ÷ wñ w˜#ñ wr   c                	óˆ   € V P                   P                   R V P                  : RV P                  : RV P                  : R2# r‹  )r!  r   rd  r—  r˜  rï   s   &r   r-  ÚPoolClearedEvent.__repr__…  sB   € Ø—.‘.×)Ñ)Ð*¨!¨D¯L©LÑ+;¸2¸d×>OÑ>OÑ=RÐRTÐUY×UqÑUqÑTtÐtuÐvÐvr   )Ú__interrupt_connectionsr  )r  r¤  )NF)r   r   r   r   r   r  rê   r  rÜ   r”  r-  r   r1  r2  s   @r   rO   rO   \  sM   ø† ñð <€I÷=ò =ð ô!ó ð!ð ô,ó ð,÷wó wr   rO   c                  ó   € ] tR tRtRtRtRtR# )rT   i‰  zªPublished when a Connection Pool is closed.

:param address: The address (host, port) pair of the server this Pool is
   attempting to connect to.

.. versionadded:: 3.9
r   Nr�  r   r   r   rT   rT   ‰  r�  r   rT   c                  ó0   € ] tR tRtRtRt Rt Rt RtRt	R# )	ÚConnectionClosedReasoni•  zeAn enum that defines values for `reason` on a
:class:`ConnectionClosedEvent`.

.. versionadded:: 3.9
ÚstaleÚidleÚerrorÚ
poolClosedr   N)
r   r   r   r   r   ÚSTALEÚIDLEÚERRORÚPOOL_CLOSEDr   r   r   r   r§  r§  •  s-   † ñð €EØFà€Dðð €EØIà€KÛEr   r§  c                  ó*   € ] tR tRtRtRt Rt RtRtR# )ÚConnectionCheckOutFailedReasoniª  zmAn enum that defines values for `reason` on a
:class:`ConnectionCheckOutFailedEvent`.

.. versionadded:: 3.9
Útimeoutr«  ÚconnectionErrorr   N)	r   r   r   r   r   ÚTIMEOUTr¯  Ú
CONN_ERRORr   r   r   r   r±  r±  ª  s#   † ñð €GØJà€KØMà"€Jór   r±  c                  óL   € ] tR tRtRtR	tR R lt]R R l4       tR R lt	R	t
R
# )Ú_ConnectionEventi½  z)Private base class for connection events.c               ó    € V ^8„  d   QhRRRR/# rc  r   )r(   s   "r   r)   Ú_ConnectionEvent.__annotate__Â  rf  r   c                	ó   € Wn         R # râ   ©Ú_ConnectionEvent__addressrj  s   &&r   rê   Ú_ConnectionEvent.__init__Â  rl  r   c               ó   € V ^8„  d   QhRR/# rø   r   )r(   s   "r   r)   r¹  Æ  rn  r   c                ó   € V P                   # )zYThe address (host, port) pair of the server this connection is
attempting to connect to.
r»  rï   s   &r   rd  Ú_ConnectionEvent.addressÅ  rq  r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   r¹  Ì  rs  r   c                	óP   € V P                   P                   R V P                  : R2# ru  )r!  r   r¼  rï   s   &r   r-  Ú_ConnectionEvent.__repr__Ì  ry  r   rz  Nr|  r   r   r   r·  r·  ½  s/   † Ù3à€Iõ!ð ôó ð÷@ñ @r   r·  c                  óX   a € ] tR tRtRtR	tR V 3R llt]R R l4       tR R lt	R	t
V ;t# )
Ú_ConnectionIdEventiÐ  z4Private base class for connection events with an id.c               ó$   € V ^8„  d   QhRRRRRR/# ©r#   rd  r   rÙ   r±   r&   r'   r   )r(   s   "r   r)   Ú_ConnectionIdEvent.__annotate__Õ  s!   € ÷ -ñ - ð -¸ð -Àñ -r   c                	ó2   <€ \         SV `  V4       W n        R # râ   )r  rê   Ú!_ConnectionIdEvent__connection_id)r/   rd  rÙ   r!  s   &&&€r   rê   Ú_ConnectionIdEvent.__init__Õ  s   ø€ Ü‰Ñ˜Ô!Ø,Ör   c               ó   € V ^8„  d   QhRR/# ró   r   )r(   s   "r   r)   rÈ  Ú  s   € ÷ $ñ $˜sñ $r   c                ó   € V P                   # )zThe ID of the connection.)rÊ  rï   s   &r   rÙ   Ú _ConnectionIdEvent.connection_idÙ  s   € ð ×#Ñ#Ð#r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   rÈ  Þ  s   € ÷ Xñ X˜#ñ Xr   c                	ól   € V P                   P                   R V P                  : RV P                  : R2# r‹  )r!  r   rd  rÊ  rï   s   &r   r-  Ú_ConnectionIdEvent.__repr__Þ  s3   € Ø—.‘.×)Ñ)Ð*¨!¨D¯L©LÑ+;¸2¸d×>RÑ>RÑ=UÐUVÐWÐWr   )Ú__connection_id)r   r   r   r   r   r  rê   r  rÙ   r-  r   r1  r2  s   @r   rÅ  rÅ  Ð  s5   ø† Ù>à$€I÷-ð -ð ô$ó ð$÷Xó Xr   rÅ  c                  óX   a € ] tR tRtRtR	tR V 3R llt]R R l4       tR R lt	R	t
V ;t# )
Ú_ConnectionDurationEventiâ  z9Private base class for connection events with a duration.c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r#   rd  r   rÙ   r±   r5  úOptional[float]r&   r'   r   )r(   s   "r   r)   Ú%_ConnectionDurationEvent.__annotate__ç  s)   € ÷ #ñ # ð #¸ð #Èð #Ð\`ñ #r   c                	ó2   <€ \         SV `  W4       W0n        R # râ   )r  rê   Ú"_ConnectionDurationEvent__duration)r/   rd  rÙ   r5  r!  s   &&&&€r   rê   Ú!_ConnectionDurationEvent.__init__ç  s   ø€ Ü‰Ñ˜Ô0Ø"Žr   c               ó   € V ^8„  d   QhRR/# )r#   r&   rÖ  r   )r(   s   "r   r)   r×  ì  s   € ÷ ñ ˜/ñ r   c                ó   € V P                   # )z=The duration of the connection event.

.. versionadded:: 4.7
)rÙ  rï   s   &r   r5  Ú!_ConnectionDurationEvent.durationë  s   € ð �‰Ðr   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   r×  ó  s   € ÷ kñ k˜#ñ kr   c                	óˆ   € V P                   P                   R V P                  : RV P                  : RV P                  : R2# r‹  )r!  r   rd  rÙ   rÙ  rï   s   &r   r-  Ú!_ConnectionDurationEvent.__repr__ó  sB   € Ø—.‘.×)Ñ)Ð*¨!¨D¯L©LÑ+;¸2¸d×>PÑ>PÑ=SÐSUÐVZ×VeÑVeÑUhÐhiÐjÐjr   )Ú
__duration)r   r   r   r   r   r  rê   r  r5  r-  r   r1  r2  s   @r   rÔ  rÔ  â  s5   ø† ÙCà€I÷#ð #ð ôó ð÷kó kr   rÔ  c                  ó   € ] tR tRtRtRtRtR# )rY   i÷  ai  Published when a Connection Pool creates a Connection object.

NOTE: This connection is not ready for use until the
:class:`ConnectionReadyEvent` is published.

:param address: The address (host, port) pair of the server this
   Connection is attempting to connect to.
:param connection_id: The integer ID of the Connection in this Pool.

.. versionadded:: 3.9
r   Nr�  r   r   r   rY   rY   ÷  s   † ñ
ð „Ir   rY   c                  ó   € ] tR tRtRtRtRtR# )r^   i  a  Published when a Connection has finished its setup, and is ready to use.

:param address: The address (host, port) pair of the server this
   Connection is attempting to connect to.
:param connection_id: The integer ID of the Connection in this Pool.

.. versionadded:: 3.9
r   Nr�  r   r   r   r^   r^     ó   † ñð „Ir   r^   c                  óX   a € ] tR tRtRtR	tR V 3R llt]R R l4       tR R lt	R	t
V ;t# )
rd   i  a3  Published when a Connection is closed.

:param address: The address (host, port) pair of the server this
   Connection is attempting to connect to.
:param connection_id: The integer ID of the Connection in this Pool.
:param reason: A reason explaining why this connection was closed.

.. versionadded:: 3.9
c               ó$   € V ^8„  d   QhRRRRRR/# )r#   rd  r   rÙ   r±   Úreasonr·   r   )r(   s   "r   r)   Ú"ConnectionClosedEvent.__annotate__!  s!   € ÷ ñ  ð ¸ð Àcñ r   c                	ó2   <€ \         SV `  W4       W0n        R # râ   )r  rê   Ú_ConnectionClosedEvent__reason)r/   rd  rÙ   rç  r!  s   &&&&€r   rê   ÚConnectionClosedEvent.__init__!  s   ø€ Ü‰Ñ˜Ô0ØŽr   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   rè  &  ó   € ÷ ñ ˜ñ r   c                ó   € V P                   # )zŠA reason explaining why this connection was closed.

The reason must be one of the strings from the
:class:`ConnectionClosedReason` enum.
)rê  rï   s   &r   rç  ÚConnectionClosedEvent.reason%  ó   € ð �}‰}Ðr   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   rè  .  ó   € ÷ 
ñ 
˜#ñ 
r   c                	óŽ   € R P                  V P                  P                  V P                  V P                  V P
                  4      # )z{}({!r}, {!r}, {!r}))r(   r!  r   rd  rÙ   rê  rï   s   &r   r-  ÚConnectionClosedEvent.__repr__.  s9   € Ø%×,Ñ,Ø�N‰N×#Ñ#Ø�L‰LØ×ÑØ�M‰Mó	
ð 	
r   ©Ú__reason©r   r   r   r   r   r  rê   r  rç  r-  r   r1  r2  s   @r   rd   rd     s7   ø† ñð €I÷ð ð ôó ð÷
ó 
r   rd   c                  ó   € ] tR tRtRtRtRtR# )ri   i7  zËPublished when the driver starts attempting to check out a connection.

:param address: The address (host, port) pair of the server this
   Connection is attempting to connect to.

.. versionadded:: 3.9
r   Nr�  r   r   r   ri   ri   7  r�  r   ri   c                  óX   a € ] tR tRtRtR	tR V 3R llt]R R l4       tR R lt	R	t
V ;t# )
rn   iC  a  Published when the driver's attempt to check out a connection fails.

:param address: The address (host, port) pair of the server this
   Connection is attempting to connect to.
:param reason: A reason explaining why connection check out failed.

.. versionadded:: 3.9
c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r#   rd  r   rç  r·   r5  rÖ  r&   r'   r   )r(   s   "r   r)   Ú*ConnectionCheckOutFailedEvent.__annotate__O  s)   € ÷ ñ  ð °#ð Àð ÐUYñ r   c                	ó8   <€ \         SV `  V^ VR7       W n        R# )é    )rd  rÙ   r5  N)r  rê   Ú&_ConnectionCheckOutFailedEvent__reason)r/   rd  rç  r5  r!  s   &&&&€r   rê   Ú&ConnectionCheckOutFailedEvent.__init__O  s   ø€ Ü‰Ñ ¸ÀHÐÔMØŽr   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   rû  T  rí  r   c                ó   € V P                   # )z“A reason explaining why connection check out failed.

The reason must be one of the strings from the
:class:`ConnectionCheckOutFailedReason` enum.
)rþ  rï   s   &r   rç  Ú$ConnectionCheckOutFailedEvent.reasonS  rð  r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   rû  \  ó   € ÷ dñ d˜#ñ dr   c                	óˆ   € V P                   P                   R V P                  : RV P                  : RV P                  : R2# r‹  )r!  r   rd  rþ  r5  rï   s   &r   r-  Ú&ConnectionCheckOutFailedEvent.__repr__\  s?   € Ø—.‘.×)Ñ)Ð*¨!¨D¯L©LÑ+;¸2¸d¿m¹mÑ=NÈbÐQU×Q^ÑQ^ÑPaÐabÐcÐcr   rõ  r÷  r2  s   @r   rn   rn   C  s9   ø† ñð €I÷ð ð ôó ð÷dó dr   rn   c                  ó   € ] tR tRtRtRtRtR# )rs   i`  a	  Published when the driver successfully checks out a connection.

:param address: The address (host, port) pair of the server this
   Connection is attempting to connect to.
:param connection_id: The integer ID of the Connection in this Pool.

.. versionadded:: 3.9
r   Nr�  r   r   r   rs   rs   `  rä  r   rs   c                  ó   € ] tR tRtRtRtRtR# )rx   im  a	  Published when the driver checks in a Connection into the Pool.

:param address: The address (host, port) pair of the server this
   Connection is attempting to connect to.
:param connection_id: The integer ID of the Connection in this Pool.

.. versionadded:: 3.9
r   Nr�  r   r   r   rx   rx   m  rä  r   rx   c                  ób   € ] tR tRtRtRtR R lt]R R l4       t]R R l4       t	R	 R
 lt
RtR# )Ú_ServerEventiz  zBase class for server events.c               ó$   € V ^8„  d   QhRRRRRR/# ©r#   Úserver_addressr   Útopology_idr
   r&   r'   r   )r(   s   "r   r)   Ú_ServerEvent.__annotate__  s!   € ÷ )ñ ) xð )¸hð )È4ñ )r   c                	ó   € Wn         W n        R # râ   )Ú_ServerEvent__server_addressÚ_ServerEvent__topology_id)r/   r  r  s   &&&r   rê   Ú_ServerEvent.__init__  s   € Ø .ÔØ(Ör   c               ó   € V ^8„  d   QhRR/# rø   r   )r(   s   "r   r)   r  „  s   € ÷ %ñ % ñ %r   c                ó   € V P                   # )z+The address (host, port) pair of the server)r  rï   s   &r   r  Ú_ServerEvent.server_addressƒ  s   € ð ×$Ñ$Ð$r   c               ó   € V ^8„  d   QhRR/# ©r#   r&   r
   r   )r(   s   "r   r)   r  ‰  ó   € ÷ "ñ "˜Xñ "r   c                ó   € V P                   # ©z>A unique identifier for the topology this server is a part of.)r  rï   s   &r   r  Ú_ServerEvent.topology_idˆ  ó   € ð ×!Ñ!Ð!r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   r  �  r  r   c                	ój   € R V P                   P                   RV P                   RV P                   R2# )Ú<Ú ú topology_id: Ú>)r!  r   r  r  rï   s   &r   r-  Ú_ServerEvent.__repr__�  s8   € Ø�4—>‘>×*Ñ*Ð+¨1¨T×-@Ñ-@Ð,AÀÐPT×P`ÑP`ÐOaÐabÐcÐcr   )Ú__server_addressÚ__topology_idN)r   r   r   r   r   r  rê   r  r  r  r-  r   r   r   r   r
  r
  z  sC   † Ù'à5€Iõ)ð ô%ó ð%ð ô"ó ð"÷dñ dr   r
  c                  ón   a € ] tR tRtRtRtR V 3R llt]R R l4       t]R R l4       t	R	 R
 lt
RtV ;t# )r¨   i‘  zBPublished when server description changes.

.. versionadded:: 3.3
c               ó(   € V ^8„  d   QhRRRRRRRR/# )r#   Úprevious_descriptionr   Únew_descriptionÚargsr   r&   r'   r   )r(   s   "r   r)   Ú*ServerDescriptionChangedEvent.__annotate__™  s2   € ÷ 1ñ 1à/ð1ð +ð1ð ð	1ð
 
ñ1r   c                	ó<   <€ \         SV `  ! V!   Wn        W n        R # râ   )r  rê   Ú4_ServerDescriptionChangedEvent__previous_descriptionÚ/_ServerDescriptionChangedEvent__new_description©r/   r)  r*  r+  r!  s   &&&*€r   rê   Ú&ServerDescriptionChangedEvent.__init__™  ó   ø€ ô 	‰Ò˜$ÒØ&:Ô#Ø!0Ör   c               ó   € V ^8„  d   QhRR/# ©r#   r&   r   r   )r(   s   "r   r)   r,  ¤  s   € ÷ +ñ +Ð&7ñ +r   c                ó   € V P                   # )zEThe previous
:class:`~pymongo.server_description.ServerDescription`.
)r.  rï   s   &r   r)  Ú2ServerDescriptionChangedEvent.previous_description£  ó   € ð
 ×*Ñ*Ð*r   c               ó   € V ^8„  d   QhRR/# r4  r   )r(   s   "r   r)   r,  «  s   € ÷ &ñ &Ð!2ñ &r   c                ó   € V P                   # )z@The new
:class:`~pymongo.server_description.ServerDescription`.
)r/  rï   s   &r   r*  Ú-ServerDescriptionChangedEvent.new_descriptionª  ó   € ð
 ×%Ñ%Ð%r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   r,  ±  rò  r   c                	óŽ   € R P                  V P                  P                  V P                  V P                  V P
                  4      # )z <{} {} changed from: {}, to: {}>)r(   r!  r   r  r)  r*  rï   s   &r   r-  Ú&ServerDescriptionChangedEvent.__repr__±  s=   € Ø1×8Ñ8Ø�N‰N×#Ñ#Ø×ÑØ×%Ñ%Ø× Ñ ó	
ð 	
r   ©Ú__new_descriptionÚ__previous_description©rA  r@  ©r   r   r   r   r   r  rê   r  r)  r*  r-  r   r1  r2  s   @r   r¨   r¨   ‘  óL   ø† ñð
 @€I÷1ð 1ð ô+ó ð+ð ô&ó ð&÷
ó 
r   r¨   c                  ó   € ] tR tRtRtRtRtR# )r£   iº  z=Published when server is initialized.

.. versionadded:: 3.3
r   Nr�  r   r   r   r£   r£   º  ó   † ñð
 „Ir   r£   c                  ó   € ] tR tRtRtRtRtR# )r¬   iÃ  z8Published when server is closed.

.. versionadded:: 3.3
r   Nr�  r   r   r   r¬   r¬   Ã  rF  r   r¬   c                  óL   € ] tR tRtRtR	tR R lt]R R l4       tR R lt	R	t
R
# )ÚTopologyEventiÌ  z+Base class for topology description events.c               ó    € V ^8„  d   QhRRRR/# ©r#   r  r
   r&   r'   r   )r(   s   "r   r)   ÚTopologyEvent.__annotate__Ñ  s   € ÷ )ñ ) Hð )°ñ )r   c                	ó   € Wn         R # râ   ©Ú_TopologyEvent__topology_id)r/   r  s   &&r   rê   ÚTopologyEvent.__init__Ñ  s   € Ø(Ör   c               ó   € V ^8„  d   QhRR/# r  r   )r(   s   "r   r)   rL  Õ  r  r   c                ó   € V P                   # r  rN  rï   s   &r   r  ÚTopologyEvent.topology_idÔ  r  r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   rL  Ù  s   € ÷ Nñ N˜#ñ Nr   c                	óP   € R V P                   P                   RV P                   R2# )r   r"  r#  )r!  r   r  rï   s   &r   r-  ÚTopologyEvent.__repr__Ù  s)   € Ø�4—>‘>×*Ñ*Ð+¨>¸$×:JÑ:JÐ9KÈ1ÐMÐMr   )r&  N)r   r   r   r   r   r  rê   r  r  r-  r   r   r   r   rI  rI  Ì  s/   † Ù5à"€Iõ)ð ô"ó ð"÷Nñ Nr   rI  c                  ón   a € ] tR tRtRtRtR V 3R llt]R R l4       t]R R l4       t	R	 R
 lt
RtV ;t# )r•   iÝ  zHPublished when the topology description changes.

.. versionadded:: 3.3
c               ó(   € V ^8„  d   QhRRRRRRRR/# )r#   r)  r   r*  r+  r   r&   r'   r   )r(   s   "r   r)   Ú,TopologyDescriptionChangedEvent.__annotate__å  s2   € ÷ 1ñ 1à1ð1ð -ð1ð ð	1ð
 
ñ1r   c                	ó<   <€ \         SV `  ! V!   Wn        W n        R # râ   )r  rê   Ú6_TopologyDescriptionChangedEvent__previous_descriptionÚ1_TopologyDescriptionChangedEvent__new_descriptionr0  s   &&&*€r   rê   Ú(TopologyDescriptionChangedEvent.__init__å  r2  r   c               ó   € V ^8„  d   QhRR/# ©r#   r&   r   r   )r(   s   "r   r)   rY  ð  s   € ÷ +ñ +Ð&9ñ +r   c                ó   € V P                   # )zIThe previous
:class:`~pymongo.topology_description.TopologyDescription`.
)r[  rï   s   &r   r)  Ú4TopologyDescriptionChangedEvent.previous_descriptionï  r7  r   c               ó   € V ^8„  d   QhRR/# r_  r   )r(   s   "r   r)   rY  ÷  s   € ÷ &ñ &Ð!4ñ &r   c                ó   € V P                   # )zDThe new
:class:`~pymongo.topology_description.TopologyDescription`.
)r\  rï   s   &r   r*  Ú/TopologyDescriptionChangedEvent.new_descriptionö  r;  r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   rY  ý  rò  r   c                	óŽ   € R P                  V P                  P                  V P                  V P                  V P
                  4      # )z-<{} topology_id: {} changed from: {}, to: {}>)r(   r!  r   r  r)  r*  rï   s   &r   r-  Ú(TopologyDescriptionChangedEvent.__repr__ý  s=   € Ø>×EÑEØ�N‰N×#Ñ#Ø×ÑØ×%Ñ%Ø× Ñ ó	
ð 	
r   r?  rB  rC  r2  s   @r   r•   r•   Ý  rD  r   r•   c                  ó   € ] tR tRtRtRtRtR# )rŽ   i  zCPublished when the topology is initialized.

.. versionadded:: 3.3
r   Nr�  r   r   r   rŽ   rŽ     rF  r   rŽ   c                  ó   € ] tR tRtRtRtRtR# )rš   i  z>Published when the topology is closed.

.. versionadded:: 3.3
r   Nr�  r   r   r   rš   rš     rF  r   rš   c                  óf   € ] tR tRtRtRtRR R llt]R R l4       t]R R l4       t	R	 R
 lt
RtR# )Ú_ServerHeartbeatEventi  z'Base class for server heartbeat events.c               ó$   € V ^8„  d   QhRRRRRR/# ©r#   rÙ   r   ÚawaitedrÎ   r&   r'   r   )r(   s   "r   r)   Ú"_ServerHeartbeatEvent.__annotate__  s!   € ÷ !ñ ! hð !¸ð !È$ñ !r   c                	ó   € Wn         W n        R # râ   )Ú$_ServerHeartbeatEvent__connection_idÚ_ServerHeartbeatEvent__awaited)r/   rÙ   rn  s   &&&r   rê   Ú_ServerHeartbeatEvent.__init__  s   € Ø,ÔØ Žr   c               ó   € V ^8„  d   QhRR/# rø   r   )r(   s   "r   r)   ro  "  s   € ÷ $ñ $˜xñ $r   c                ó   € V P                   # )zCThe address (host, port) of the server this heartbeat was sent
to.
)rq  rï   s   &r   rÙ   Ú#_ServerHeartbeatEvent.connection_id!  s   € ð
 ×#Ñ#Ð#r   c               ó   € V ^8„  d   QhRR/# rž  r   )r(   s   "r   r)   ro  )  s   € ÷ ñ ˜ñ r   c                ó   € V P                   # )zWWhether the heartbeat was issued as an awaitable hello command.

.. versionadded:: 4.6
)rr  rï   s   &r   rn  Ú_ServerHeartbeatEvent.awaited(  s   € ð �~‰~Ðr   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   ro  0  s   € ÷ [ñ [˜#ñ [r   c                	ój   € R V P                   P                   RV P                   RV P                   R2# )r   r!  z
 awaited: r#  )r!  r   rÙ   rn  rï   s   &r   r-  Ú_ServerHeartbeatEvent.__repr__0  s4   € Ø�4—>‘>×*Ñ*Ð+¨1¨T×-?Ñ-?Ð,@À
È4Ï<É<È.ÐXYÐZÐZr   )Ú	__awaitedrÒ  N)rÒ  r}  ©F)r   r   r   r   r   r  rê   r  rÙ   rn  r-  r   r   r   r   rk  rk    sC   † Ù1à0€I÷!ð ô$ó ð$ð ôó ð÷[ñ [r   rk  c                  ó   € ] tR tRtRtRtRtR# )r   i4  z>Published when a heartbeat is started.

.. versionadded:: 3.3
r   Nr�  r   r   r   r   r   4  rF  r   r   c                  óŽ   a € ] tR tRtRtRtRR V 3R lllt]R R l4       t]R R l4       t	]R	 V 3R
 ll4       t
R R ltRtV ;t# )r„   i=  zAFired when the server heartbeat succeeds.

.. versionadded:: 3.3
c          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r#   r5  Úfloatr7  úHello[dict[str, Any]]rÙ   r   rn  rÎ   r&   r'   r   )r(   s   "r   r)   Ú*ServerHeartbeatSucceededEvent.__annotate__E  s<   € ÷ 	ñ 	àð	ð %ð	ð  ð		ð
 ð	ð 
ñ	r   c                	ó>   <€ \         SV `  W44       Wn        W n        R # râ   )r  rê   Ú(_ServerHeartbeatSucceededEvent__durationÚ%_ServerHeartbeatSucceededEvent__reply©r/   r5  r7  rÙ   rn  r!  s   &&&&&€r   rê   Ú&ServerHeartbeatSucceededEvent.__init__E  s   ø€ ô 	‰Ñ˜Ô0Ø"ŒØŽr   c               ó   € V ^8„  d   QhRR/# ©r#   r&   r‚  r   )r(   s   "r   r)   r„  Q  ó   € ÷ ñ ˜%ñ r   c                ó   € V P                   # ©z/The duration of this heartbeat in microseconds.)r†  rï   s   &r   r5  Ú&ServerHeartbeatSucceededEvent.durationP  rñ   r   c               ó   € V ^8„  d   QhRR/# )r#   r&   rƒ  r   )r(   s   "r   r)   r„  V  s   € ÷ ñ Ð,ñ r   c                ó   € V P                   # )z-An instance of :class:`~pymongo.hello.Hello`.)r‡  rï   s   &r   r7  Ú#ServerHeartbeatSucceededEvent.replyU  r  r   c               ó   € V ^8„  d   QhRR/# rž  r   )r(   s   "r   r)   r„  [  ó   € ÷ 	ñ 	˜ñ 	r   c                ó   <€ \         SV `  # ©zÐWhether the heartbeat was awaited.

If true, then :meth:`duration` reflects the sum of the round trip time
to the server and the time that the server waited before sending a
response.

.. versionadded:: 3.11
©r  rn  r)  s   &€r   rn  Ú%ServerHeartbeatSucceededEvent.awaitedZ  ó   ø€ ô ‰w‰Ðr   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   r„  f  ó   € ÷ 
ñ 
˜#ñ 
r   c                	ó¤   € R P                  V P                  P                  V P                  V P                  V P
                  V P                  4      # )z,<{} {} duration: {}, awaited: {}, reply: {}>©r(   r!  r   rÙ   r5  rn  r7  rï   s   &r   r-  Ú&ServerHeartbeatSucceededEvent.__repr__f  s@   € Ø=×DÑDØ�N‰N×#Ñ#Ø×ÑØ�M‰MØ�L‰LØ�J‰Jó
ð 	
r   ©rá  rM  r~  ©r   r   r   r   r   r  rê   r  r5  r7  rn  r-  r   r1  r2  s   @r   r„   r„   =  s_   ø† ñð
 *€I÷	ò 	ð ôó ðð ôó ðð ÷	ó ð	÷
ó 
r   r„   c                  óŽ   a € ] tR tRtRtRtRR V 3R lllt]R R l4       t]R R l4       t	]R	 V 3R
 ll4       t
R R ltRtV ;t# )rˆ   ip  zlFired when the server heartbeat fails, either with an "ok: 0"
or a socket exception.

.. versionadded:: 3.3
c          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r#   r5  r‚  r7  Ú	ExceptionrÙ   r   rn  rÎ   r&   r'   r   )r(   s   "r   r)   Ú'ServerHeartbeatFailedEvent.__annotate__y  s4   € ÷ ñ ØðØ&/ðØ@HðØSWðà	ñr   c                	ó>   <€ \         SV `  W44       Wn        W n        R # râ   )r  rê   Ú%_ServerHeartbeatFailedEvent__durationÚ"_ServerHeartbeatFailedEvent__replyrˆ  s   &&&&&€r   rê   Ú#ServerHeartbeatFailedEvent.__init__y  s   ø€ ô 	‰Ñ˜Ô0Ø"ŒØŽr   c               ó   € V ^8„  d   QhRR/# r‹  r   )r(   s   "r   r)   r¤  �  rŒ  r   c                ó   € V P                   # rŽ  )r¦  rï   s   &r   r5  Ú#ServerHeartbeatFailedEvent.duration€  rñ   r   c               ó   € V ^8„  d   QhRR/# )r#   r&   r£  r   )r(   s   "r   r)   r¤  †  s   € ÷ ñ �yñ r   c                ó   € V P                   # )zA subclass of :exc:`Exception`.)r§  rï   s   &r   r7  Ú ServerHeartbeatFailedEvent.reply…  r  r   c               ó   € V ^8„  d   QhRR/# rž  r   )r(   s   "r   r)   r¤  ‹  r”  r   c                ó   <€ \         SV `  # r–  r—  r)  s   &€r   rn  Ú"ServerHeartbeatFailedEvent.awaitedŠ  r™  r   c               ó   € V ^8„  d   QhRR/# rí   r   )r(   s   "r   r)   r¤  –  r›  r   c                	ó¤   € R P                  V P                  P                  V P                  V P                  V P
                  V P                  4      # )z.<{} {} duration: {}, awaited: {}, reply: {!r}>r�  rï   s   &r   r-  Ú#ServerHeartbeatFailedEvent.__repr__–  s@   € Ø?×FÑFØ�N‰N×#Ñ#Ø×ÑØ�M‰MØ�L‰LØ�J‰Jó
ð 	
r   rŸ  r~  r   r2  s   @r   rˆ   rˆ   p  s_   ø† ñð *€I÷ò ð ôó ðð ôó ðð ÷	ó ð	÷
ó 
r   rˆ   c                  óÄ  € ] tR tRtRtR R lt]R R l4       t]R R l4       t]R	 R
 l4       t	]R R l4       t
]R R l4       tR R ltRAR R lltRBR R lltRCR R lltR R ltR R ltR R ltR R ltR  R! ltR" R# ltR$ R% ltR& R' ltR( R) ltR* R+ ltR, R- ltRDR. R/ lltR0 R1 ltR2 R3 ltR4 R5 ltR6 R7 ltR8 R9 lt R: R; lt!R< R= lt"R> R? lt#R@t$R# )EÚ_EventListenersi   z¡Configure event listeners for a client instance.

Any event listeners registered globally are included by default.

:param listeners: A list of event listeners.
c               ó   € V ^8„  d   QhRR/# )r#   r¸   z"Optional[Sequence[_EventListener]]r   )r(   s   "r   r)   Ú_EventListeners.__annotate__¨  s   € ÷ >ñ >Ð"Dñ >r   c                	ó0  € \         P                  R ,          V n        \         P                  R ,          V n        \         P
                  pVR ,          V n        \         P                  R ,          V n        \         P                  R ,          V n
        VEe   V Fú  p\        V\        4      '       d   V P                  P                  V4       \        V\        4      '       d   V P                  P                  V4       \        V\        4      '       d   V P                  P                  V4       \        V\         4      '       d   V P                  P                  V4       \        V\"        4      '       g   Kß  V P                  P                  V4       Kü  	  \%        V P                  4      V n        \%        V P                  4      V n        \%        V P                  4      V n        \%        V P                  4      V n        \%        V P                  4      V n        R# ):NNNN)rÃ   rÄ   Ú"_EventListeners__command_listenersrÇ   Ú!_EventListeners__server_listenersrÆ   Ú+_EventListeners__server_heartbeat_listenersrÈ   Ú#_EventListeners__topology_listenersrÉ   Ú_EventListeners__cmap_listenersr¼   r!   rÅ   r¡   r}   rŒ   r@   rÎ   Ú%_EventListeners__enabled_for_commandsÚ#_EventListeners__enabled_for_serverÚ-_EventListeners__enabled_for_server_heartbeatÚ%_EventListeners__enabled_for_topologyÚ!_EventListeners__enabled_for_cmap)r/   r¸   Úlsts   && r   rê   Ú_EventListeners.__init__¨  s~  € Ü#-×#?Ñ#?ÀÕ#BˆÔ Ü",×"=Ñ"=¸aÕ"@ˆÔÜ×3Ñ3ˆØ,/°­FˆÔ)Ü$.×$AÑ$AÀ!Õ$DˆÔ!Ü *× 9Ñ 9¸!Õ <ˆÔØÓ Û �Ü˜c¤?×3Ò3Ø×,Ñ,×3Ñ3°CÔ8Ü˜c¤>×2Ò2Ø×+Ñ+×2Ñ2°3Ô7Ü˜cÔ#:×;Ò;Ø×5Ñ5×<Ñ<¸SÔAÜ˜cÔ#3×4Ò4Ø×-Ñ-×4Ñ4°SÔ9Ü˜cÔ#9×:Ô:Ø×)Ñ)×0Ñ0°Ö5ñ !ô '+¨4×+CÑ+CÓ&DˆÔ#Ü$(¨×)@Ñ)@Ó$AˆÔ!Ü.2°4×3TÑ3TÓ.UˆÔ+Ü&*¨4×+DÑ+DÓ&EˆÔ#Ü"& t×'<Ñ'<Ó"=ˆÖr   c               ó   € V ^8„  d   QhRR/# rž  r   )r(   s   "r   r)   r¸  Â  ó   € ÷ +ñ + dñ +r   c                ó   € V P                   # )z-Are any CommandListener instances registered?)r¿  rï   s   &r   Úenabled_for_commandsÚ$_EventListeners.enabled_for_commandsÁ  ó   € ð ×*Ñ*Ð*r   c               ó   € V ^8„  d   QhRR/# rž  r   )r(   s   "r   r)   r¸  Ç  s   € ÷ )ñ ) Dñ )r   c                ó   € V P                   # )z,Are any ServerListener instances registered?)rÀ  rï   s   &r   Úenabled_for_serverÚ"_EventListeners.enabled_for_serverÆ  s   € ð ×(Ñ(Ð(r   c               ó   € V ^8„  d   QhRR/# rž  r   )r(   s   "r   r)   r¸  Ì  s   € ÷ 3ñ 3¨dñ 3r   c                ó   € V P                   # )z5Are any ServerHeartbeatListener instances registered?)rÁ  rï   s   &r   Úenabled_for_server_heartbeatÚ,_EventListeners.enabled_for_server_heartbeatË  s   € ð ×2Ñ2Ð2r   c               ó   € V ^8„  d   QhRR/# rž  r   )r(   s   "r   r)   r¸  Ñ  rÇ  r   c                ó   € V P                   # )z.Are any TopologyListener instances registered?)rÂ  rï   s   &r   Úenabled_for_topologyÚ$_EventListeners.enabled_for_topologyÐ  rË  r   c               ó   € V ^8„  d   QhRR/# rž  r   )r(   s   "r   r)   r¸  Ö  s   € ÷ 'ñ ' $ñ 'r   c                ó   € V P                   # )z4Are any ConnectionPoolListener instances registered?)rÃ  rï   s   &r   Úenabled_for_cmapÚ _EventListeners.enabled_for_cmapÕ  s   € ð ×&Ñ&Ð&r   c               ó   € V ^8„  d   QhRR/# )r#   r&   zlist[_EventListeners]r   )r(   s   "r   r)   r¸  Ú  s   € ÷ 
ñ 
Ð!6ñ 
r   c                ó¢   € V P                   V P                  ,           V P                  ,           V P                  ,           V P                  ,           # )z#List of registered event listeners.)rº  r¼  r»  r½  r¾  rï   s   &r   Úevent_listenersÚ_EventListeners.event_listenersÚ  sN   € ð ×$Ñ$Ø×/Ñ/õ0à×%Ñ%õ&ð ×'Ñ'õ(ð ×#Ñ#õ	$ð	
r   Nc               ó8   € V ^8„  d   QhRRRRRRRRR	R
RR
RRRR/# )r#   r  r   rÞ   r·   rØ   r±   rÙ   r   rß   rÛ   Úop_idrÜ   rÝ   r&   r'   r   )r(   s   "r   r)   r¸  ä  sZ   € ÷ $$ñ $$àð$$ð ð$$ð ð	$$ð
  ð$$ð ,ð$$ð ð$$ð 'ð$$ð 
ñ$$r   c           
     ó¸   € Vf   Tp\        VVVVVVVR7      pV P                   F  p	 V	P                  V4       K  	  R#   \         d    \	        4         K3  i ; i)aÈ  Publish a CommandStartedEvent to all command listeners.

:param command: The command document.
:param database_name: The name of the database this command was run
    against.
:param request_id: The request id for this operation.
:param connection_id: The address (host, port) of the server this
    command was sent to.
:param op_id: The (optional) operation id for this operation.
:param service_id: The service_id this command was sent to, or ``None``.
N)rÜ   rß   )r%   rº  r0   r£  r   )
r/   r  rÞ   rØ   rÙ   rß   rá  rÜ   r$   Ú
subscribers
   &&&&&&&&  r   Úpublish_command_startÚ%_EventListeners.publish_command_startä  si   € ð* Š=ØˆEÜ#ØØØØØØ!Ø!5ô
ˆð ×2Ô2ˆJð$Ø×"Ñ" 5Ö)ó 3øô ô $Ü!×#ð$ús   ©A Á AÁAc               óD   € V ^8„  d   QhRRRRRRRRR	R
RRRRRRRRRRRR/# )r#   r5  r   r7  r   rÌ   r·   rØ   r±   rÙ   r   rß   rÛ   rá  rÜ   rÝ   Úspeculative_hellorÎ   rÞ   r&   r'   r   )r(   s   "r   r)   r¸  
  sx   € ÷ /$ñ /$àð/$ð ð/$ð ð	/$ð
 ð/$ð  ð/$ð ,ð/$ð ð/$ð 'ð/$ð  ð/$ð ð/$ð 
ñ/$r   c                óÐ   € Vf   TpV	'       d   / p\        VVVVVVVV
VR7	      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)ap  Publish a CommandSucceededEvent to all command listeners.

:param duration: The command duration as a datetime.timedelta.
:param reply: The server reply document.
:param command_name: The command name.
:param request_id: The request id for this operation.
:param connection_id: The address (host, port) of the server this
    command was sent to.
:param op_id: The (optional) operation id for this operation.
:param service_id: The service_id this command was sent to, or ``None``.
:param speculative_hello: Was the command sent with speculative auth?
:param database_name: The database this command was sent to, or ``""``.
N)rÞ   rß   )r4   rº  r6   r£  r   )r/   r5  r7  rÌ   rØ   rÙ   rß   rá  rÜ   rç  rÞ   r$   rã  s   &&&&&&&&&&&  r   Úpublish_command_successÚ'_EventListeners.publish_command_success
  sy   € ð4 Š=ØˆEßð ˆEÜ%ØØØØØØØØ'Ø!5ô

ˆð ×2Ô2ˆJð$Ø×$Ñ$ UÖ+ó 3øô ô $Ü!×#ð$ús   µAÁA%Á$A%c               ó@   € V ^8„  d   QhRRRRRRRRR	R
RRRRRRRRRR/
# )r#   r5  r   rP  r   rÌ   r·   rØ   r±   rÙ   r   rß   rÛ   rá  rÜ   rÝ   rÞ   r&   r'   r   )r(   s   "r   r)   r¸  ;  sn   € ÷ *$ñ *$àð*$ð ð*$ð ð	*$ð
 ð*$ð  ð*$ð ,ð*$ð ð*$ð 'ð*$ð ð*$ð 
ñ*$r   c
                ó¼   € Vf   Tp\        VVVVVVVV	VR7	      p
V P                   F  p VP                  V
4       K  	  R#   \         d    \	        4         K3  i ; i)aM  Publish a CommandFailedEvent to all command listeners.

:param duration: The command duration as a datetime.timedelta.
:param failure: The server reply document or failure description
    document.
:param command_name: The command name.
:param request_id: The request id for this operation.
:param connection_id: The address (host, port) of the server this
    command was sent to.
:param op_id: The (optional) operation id for this operation.
:param service_id: The service_id this command was sent to, or ``None``.
:param database_name: The database this command was sent to, or ``""``.
Nr  )r9   rº  r<   r£  r   )r/   r5  rP  rÌ   rØ   rÙ   rß   rá  rÜ   rÞ   r$   rã  s   &&&&&&&&&&  r   Úpublish_command_failureÚ'_EventListeners.publish_command_failure;  so   € ð2 Š=ØˆEÜ"ØØØØØØØ!Ø'Ø!5ô

ˆð ×2Ô2ˆJð$Ø×!Ñ! %Ö(ó 3øô ô $Ü!×#ð$ús   «AÁAÁAc               ó$   € V ^8„  d   QhRRRRRR/# rm  r   )r(   s   "r   r)   r¸  g  s#   € ÷ $ñ $¸hð $ÐQUð $ÐZ^ñ $r   c                óž   € \        W4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)zßPublish a ServerHeartbeatStartedEvent to all server heartbeat
listeners.

:param connection_id: The address (host, port) pair of the connection.
:param awaited: True if this heartbeat is part of an awaitable hello command.
N)r   r¼  r0   r£  r   )r/   rÙ   rn  r$   rã  s   &&&  r   Ú publish_server_heartbeat_startedÚ0_EventListeners.publish_server_heartbeat_startedg  sH   € ô ,¨MÓCˆØ×;Ô;ˆJð$Ø×"Ñ" 5Ö)ó <øô ô $Ü!×#ð$úó   œ3³AÁAc          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r#   rÙ   r   r5  r‚  r7  rƒ  rn  rÎ   r&   r'   r   )r(   s   "r   r)   r¸  u  s4   € ÷ $ñ $Ø%ð$Ø16ð$Ø?Tð$Ø_cð$à	ñ$r   c                ó    € \        W#W4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)aP  Publish a ServerHeartbeatSucceededEvent to all server heartbeat
listeners.

:param connection_id: The address (host, port) pair of the connection.
:param duration: The execution time of the event in the highest possible
    resolution for the platform.
:param reply: The command reply.
:param awaited: True if the response was awaited.
N)r„   r¼  r6   r£  r   ©r/   rÙ   r5  r7  rn  r$   rã  s   &&&&&  r   Ú"publish_server_heartbeat_succeededÚ2_EventListeners.publish_server_heartbeat_succeededu  sJ   € ô .¨h¸}ÓVˆØ×;Ô;ˆJð$Ø×$Ñ$ UÖ+ó <øô ô $Ü!×#ð$úó   �4´AÁAc          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r#   rÙ   r   r5  r‚  r7  r£  rn  rÎ   r&   r'   r   )r(   s   "r   r)   r¸  ˆ  s4   € ÷ $ñ $Ø%ð$Ø16ð$Ø?Hð$ØSWð$à	ñ$r   c                ó    € \        W#W4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)aM  Publish a ServerHeartbeatFailedEvent to all server heartbeat
listeners.

:param connection_id: The address (host, port) pair of the connection.
:param duration: The execution time of the event in the highest possible
    resolution for the platform.
:param reply: The command reply.
:param awaited: True if the response was awaited.
N)rˆ   r¼  r<   r£  r   rö  s   &&&&&  r   Úpublish_server_heartbeat_failedÚ/_EventListeners.publish_server_heartbeat_failedˆ  sJ   € ô +¨8¸MÓSˆØ×;Ô;ˆJð$Ø×!Ñ! %Ö(ó <øô ô $Ü!×#ð$úrù  c               ó$   € V ^8„  d   QhRRRRRR/# r  r   )r(   s   "r   r)   r¸  ›  ó"   € ÷ $ñ $°Hð $È8ð $ÐX\ñ $r   c                óž   € \        W4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)zÑPublish a ServerOpeningEvent to all server listeners.

:param server_address: The address (host, port) pair of the server.
:param topology_id: A unique identifier for the topology this server
   is a part of.
N)r£   r»  r’   r£  r   ©r/   r  r  r$   rã  s   &&&  r   Úpublish_server_openedÚ%_EventListeners.publish_server_opened›  sH   € ô # >Ó?ˆØ×1Ô1ˆJð$Ø×!Ñ! %Ö(ó 2øô ô $Ü!×#ð$úró  c               ó$   € V ^8„  d   QhRRRRRR/# r  r   )r(   s   "r   r)   r¸  ©  rÿ  r   c                óž   € \        W4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)zÐPublish a ServerClosedEvent to all server listeners.

:param server_address: The address (host, port) pair of the server.
:param topology_id: A unique identifier for the topology this server
   is a part of.
N)r¬   r»  rœ   r£  r   r  s   &&&  r   Úpublish_server_closedÚ%_EventListeners.publish_server_closed©  sH   € ô " .Ó>ˆØ×1Ô1ˆJð$Ø×!Ñ! %Ö(ó 2øô ô $Ü!×#ð$úró  c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r#   r)  r   r*  r  r   r  r
   r&   r'   r   )r(   s   "r   r)   r¸  ·  s<   € ÷ $ñ $à/ð$ð +ð$ð !ð	$ð
 ð$ð 
ñ$r   c                ó    € \        WW44      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)aN  Publish a ServerDescriptionChangedEvent to all server listeners.

:param previous_description: The previous server description.
:param server_address: The address (host, port) pair of the server.
:param new_description: The new server description.
:param topology_id: A unique identifier for the topology this server
   is a part of.
N)r¨   r»  r—   r£  r   )r/   r)  r*  r  r  r$   rã  s   &&&&&  r   Ú"publish_server_description_changedÚ2_EventListeners.publish_server_description_changed·  sO   € ô .Ø °>ó
ˆð ×1Ô1ˆJð$Ø×.Ñ.¨uÖ5ó 2øô ô $Ü!×#ð$úrù  c               ó    € V ^8„  d   QhRRRR/# rK  r   )r(   s   "r   r)   r¸  Ï  ó   € ÷ $ñ $°8ð $Àñ $r   c                óž   € \        V4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)z�Publish a TopologyOpenedEvent to all topology listeners.

:param topology_id: A unique identifier for the topology this server
   is a part of.
N)rŽ   r½  r’   r£  r   ©r/   r  r$   rã  s   &&  r   Úpublish_topology_openedÚ'_EventListeners.publish_topology_openedÏ  óH   € ô $ KÓ0ˆØ×3Ô3ˆJð$Ø×!Ñ! %Ö(ó 4øô ô $Ü!×#ð$úró  c               ó    € V ^8„  d   QhRRRR/# rK  r   )r(   s   "r   r)   r¸  Ü  r  r   c                óž   € \        V4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)z�Publish a TopologyClosedEvent to all topology listeners.

:param topology_id: A unique identifier for the topology this server
   is a part of.
N)rš   r½  rœ   r£  r   r  s   &&  r   Úpublish_topology_closedÚ'_EventListeners.publish_topology_closedÜ  r  ró  c               ó(   € V ^8„  d   QhRRRRRRRR/# )r#   r)  r   r*  r  r
   r&   r'   r   )r(   s   "r   r)   r¸  é  s2   € ÷ $ñ $à1ð$ð -ð$ð ð	$ð
 
ñ$r   c                ó    € \        WV4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)a  Publish a TopologyDescriptionChangedEvent to all topology listeners.

:param previous_description: The previous topology description.
:param new_description: The new topology description.
:param topology_id: A unique identifier for the topology this server
   is a part of.
N)r•   r½  r—   r£  r   )r/   r)  r*  r  r$   rã  s   &&&&  r   Ú$publish_topology_description_changedÚ4_EventListeners.publish_topology_description_changedé  sL   € ô 0Ð0DÐWbÓcˆØ×3Ô3ˆJð$Ø×.Ñ.¨uÖ5ó 4øô ô $Ü!×#ð$úrù  c               ó$   € V ^8„  d   QhRRRRRR/# r  r   )r(   s   "r   r)   r¸  ý  s"   € ÷ $ñ $¨Hð $¸~ð $ÐRVñ $r   c                óž   € \        W4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)z:Publish a :class:`PoolCreatedEvent` to all pool listeners.N)rB   r¾  rF   r£  r   )r/   rd  r€  r$   rã  s   &&&  r   Úpublish_pool_createdÚ$_EventListeners.publish_pool_createdý  sF   € ä  Ó2ˆØ×/Ô/ˆJð$Ø×'Ñ'¨Ö.ó 0øô ô $Ü!×#ð$úró  c               ó    € V ^8„  d   QhRRRR/# rc  r   )r(   s   "r   r)   r¸    s   € ÷ $ñ $¨(ð $°tñ $r   c                óž   € \        V4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)z8Publish a :class:`PoolReadyEvent` to all pool listeners.N)rJ   r¾  rL   r£  r   ©r/   rd  r$   rã  s   &&  r   Úpublish_pool_readyÚ"_EventListeners.publish_pool_ready  sF   € ä˜wÓ'ˆØ×/Ô/ˆJð$Ø×%Ñ% eÖ,ó 0øô ô $Ü!×#ð$úró  c               ó(   € V ^8„  d   QhRRRRRRRR/# r“  r   )r(   s   "r   r)   r¸    s2   € ÷ $ñ $àð$ð 'ð$ð  $ð	$ð
 
ñ$r   c                ó    € \        WV4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)z:Publish a :class:`PoolClearedEvent` to all pool listeners.N)rO   r¾  rQ   r£  r   )r/   rd  rÜ   r”  r$   rã  s   &&&&  r   Úpublish_pool_clearedÚ$_EventListeners.publish_pool_cleared  sK   € ô ! Ð6KÓLˆØ×/Ô/ˆJð$Ø×'Ñ'¨Ö.ó 0øô ô $Ü!×#ð$úrù  c               ó    € V ^8„  d   QhRRRR/# rc  r   )r(   s   "r   r)   r¸    s   € ÷ $ñ $¨8ð $¸ñ $r   c                óž   € \        V4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)z9Publish a :class:`PoolClosedEvent` to all pool listeners.N)rT   r¾  rV   r£  r   r!  s   &&  r   Úpublish_pool_closedÚ#_EventListeners.publish_pool_closed  sF   € ä Ó(ˆØ×/Ô/ˆJð$Ø×&Ñ& uÖ-ó 0øô ô $Ü!×#ð$úró  c               ó$   € V ^8„  d   QhRRRRRR/# rÇ  r   )r(   s   "r   r)   r¸  &  s"   € ÷ 	$ñ 	$°(ð 	$È3ð 	$ÐSWñ 	$r   c                óž   € \        W4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)zGPublish a :class:`ConnectionCreatedEvent` to all connection
listeners.
N)rY   r¾  r[   r£  r   ©r/   rd  rÙ   r$   rã  s   &&&  r   Úpublish_connection_createdÚ*_EventListeners.publish_connection_created&  sH   € ô ' wÓ>ˆØ×/Ô/ˆJð$Ø×-Ñ-¨eÖ4ó 0øô ô $Ü!×#ð$úró  c               ó(   € V ^8„  d   QhRRRRRRRR/# ©	r#   rd  r   rÙ   r±   r5  r‚  r&   r'   r   )r(   s   "r   r)   r¸  1  s,   € ÷ 	$ñ 	$Øð	$Ø03ð	$Ø?Dð	$à	ñ	$r   c                ó    € \        WV4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)zDPublish a :class:`ConnectionReadyEvent` to all connection listeners.N)r^   r¾  r`   r£  r   ©r/   rd  rÙ   r5  r$   rã  s   &&&&  r   Úpublish_connection_readyÚ(_EventListeners.publish_connection_ready1  sJ   € ô % W¸XÓFˆØ×/Ô/ˆJð$Ø×+Ñ+¨EÖ2ó 0øô ô $Ü!×#ð$úrù  c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r#   rd  r   rÙ   r±   rç  r·   r&   r'   r   )r(   s   "r   r)   r¸  <  s*   € ÷ 	$ñ 	$°ð 	$È#ð 	$ÐWZð 	$Ð_cñ 	$r   c                ó    € \        WV4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)zFPublish a :class:`ConnectionClosedEvent` to all connection
listeners.
N)rd   r¾  rf   r£  r   )r/   rd  rÙ   rç  r$   rã  s   &&&&  r   Úpublish_connection_closedÚ)_EventListeners.publish_connection_closed<  sJ   € ô & g¸fÓEˆØ×/Ô/ˆJð$Ø×,Ñ,¨UÖ3ó 0øô ô $Ü!×#ð$úrù  c               ó    € V ^8„  d   QhRRRR/# rc  r   )r(   s   "r   r)   r¸  G  s   € ÷ 	$ñ 	$¸Hð 	$Èñ 	$r   c                óž   € \        V4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)zOPublish a :class:`ConnectionCheckOutStartedEvent` to all connection
listeners.
N)ri   r¾  rk   r£  r   r!  s   &&  r   Ú$publish_connection_check_out_startedÚ4_EventListeners.publish_connection_check_out_startedG  sH   € ô /¨wÓ7ˆØ×/Ô/ˆJð$Ø×7Ñ7¸Ö>ó 0øô ô $Ü!×#ð$úró  c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r#   rd  r   rç  r·   r5  r‚  r&   r'   r   )r(   s   "r   r)   r¸  R  s,   € ÷ $ñ $Øð$Ø),ð$Ø8=ð$à	ñ$r   c                ó    € \        WV4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)zNPublish a :class:`ConnectionCheckOutFailedEvent` to all connection
listeners.
N)rn   r¾  rp   r£  r   )r/   rd  rç  r5  r$   rã  s   &&&&  r   Ú#publish_connection_check_out_failedÚ3_EventListeners.publish_connection_check_out_failedR  sJ   € ô .¨g¸xÓHˆØ×/Ô/ˆJð$Ø×6Ñ6°uÖ=ó 0øô ô $Ü!×#ð$úrù  c               ó(   € V ^8„  d   QhRRRRRRRR/# r2  r   )r(   s   "r   r)   r¸  _  s,   € ÷ $ñ $Øð$Ø03ð$Ø?Dð$à	ñ$r   c                ó    € \        WV4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)zJPublish a :class:`ConnectionCheckedOutEvent` to all connection
listeners.
N)rs   r¾  ru   r£  r   r4  s   &&&&  r   Úpublish_connection_checked_outÚ._EventListeners.publish_connection_checked_out_  sJ   € ô *¨'À(ÓKˆØ×/Ô/ˆJð$Ø×1Ñ1°%Ö8ó 0øô ô $Ü!×#ð$úrù  c               ó$   € V ^8„  d   QhRRRRRR/# rÇ  r   )r(   s   "r   r)   r¸  l  s"   € ÷ 	$ñ 	$°Xð 	$Ècð 	$ÐVZñ 	$r   c                óž   € \        W4      pV P                   F  p VP                  V4       K  	  R#   \         d    \	        4         K3  i ; i)zIPublish a :class:`ConnectionCheckedInEvent` to all connection
listeners.
N)rx   r¾  rz   r£  r   r.  s   &&&  r   Úpublish_connection_checked_inÚ-_EventListeners.publish_connection_checked_inl  sH   € ô )¨Ó@ˆØ×/Ô/ˆJð$Ø×0Ñ0°Ö7ó 0øô ô $Ü!×#ð$úró  )
Ú__cmap_listenersÚ__command_listenersÚ__enabled_for_cmapÚ__enabled_for_commandsÚ__enabled_for_serverÚ__enabled_for_server_heartbeatÚ__enabled_for_topologyÚ__server_heartbeat_listenersÚ__server_listenersÚ__topology_listenersr0  )NNFr  )NNr  r~  )%r   r   r   r   r   rê   r  rÉ  rÎ  rÒ  rÖ  rÚ  rÞ  rä  ré  rí  rñ  r÷  rü  r  r  r
  r  r  r  r  r"  r&  r*  r/  r5  r9  r=  rA  rE  rI  r   r   r   r   r¶  r¶     sð   † ñõ>ð2 ô+ó ð+ð ô)ó ð)ð ô3ó ð3ð ô+ó ð+ð ô'ó ð'õ
÷$$÷L/$÷b*$õX$õ$õ&$õ&$õ$õ$õ0$õ$õ$õ($õ$÷$õ$õ	$õ	$õ	$õ	$õ$õ$÷	$ñ 	$r   r¶  )rÄ   rÇ   rÆ   rÈ   rÉ   )Kr   Ú
__future__r   ÚdatetimeÚcollectionsr   r   Útypingr   r   r   r   r	   Úbson.objectidr
   Úpymongo.hellor   r   Úpymongo.helpers_sharedr   r   Úpymongo.typingsr   r   r   Úpymongo.server_descriptionr   Úpymongo.topology_descriptionr   r   rÃ   r   r!   r@   r}   rŒ   r¡   r´   rÀ   rÊ   rÔ   rÖ   r%   r4   r9   ra  rB   rJ   rO   rT   r§  r±  r·  rÅ  rÔ  rY   r^   rd   ri   rn   rs   rx   r
  r¨   r£   r¬   rI  r•   rŽ   rš   rk  r   r„   rˆ   r¶  r   r   r   Ú<module>r_     sv  ðñlõ\ #ã ß 'ß BÕ Bå "ß ,ß Iß 2çÝ"å<Ý@ñ Øðó	€
ñ ˜˜B  B¨Ó+€
÷7ñ 7ô"�nô "ô:u"˜^ô u"ôp"˜nô "ô>"�~ô "ô<"�^ô "õ<+õ
õ$3õ:÷I%ñ I%ôX@
˜-ô @
ôFB
˜Mô B
ôJ@
˜ô @
÷F@ñ @ô&R�zô Rô0	�Zô 	ô*w�zô *wôZ	�jô 	÷Fñ F÷*ñ ÷&@ñ @ô&XÐ)ô Xô$kÐ1ô kô*Ð/ô ô 
Ð3ô 
ô 
Ð.ô  
ôF	Ð%5ô 	ôdÐ$<ô dô:
Ð 8ô 
ô
Ð1ô 
÷dñ dô.&
 Lô &
ôR˜ô ô˜ô ÷Nñ Nô"&
 mô &
ôR˜-ô ô˜-ô ÷[ñ [ô8Ð"7ô ô0
Ð$9ô 0
ôf-
Ð!6ô -
÷`U$ó U$r   