|
def | __init__ (self, server_description, pool, monitor, topology_id=None, listeners=None, events=None) |
|
def | open (self) |
|
def | reset (self) |
|
def | close (self) |
|
def | request_check (self) |
|
def | run_operation_with_response (self, sock_info, operation, set_slave_okay, listeners, exhaust, unpack_res) |
|
def | get_socket (self, all_credentials, checkout=False) |
|
def | description (self) |
|
def | description (self, server_description) |
|
def | pool (self) |
|
def | __repr__ (self) |
|
◆ __init__()
def __init__ |
( |
|
self, |
|
|
|
server_description, |
|
|
|
pool, |
|
|
|
monitor, |
|
|
|
topology_id = None , |
|
|
|
listeners = None , |
|
|
|
events = None |
|
) |
| |
Represent one MongoDB server.
◆ __repr__()
◆ close()
Clear the connection pool and stop the monitor.
Reconnect with open().
◆ description() [1/2]
◆ description() [2/2]
def description |
( |
|
self, |
|
|
|
server_description |
|
) |
| |
◆ get_socket()
def get_socket |
( |
|
self, |
|
|
|
all_credentials, |
|
|
|
checkout = False |
|
) |
| |
◆ open()
Start monitoring, or restart after a fork.
Multiple calls have no effect.
◆ pool()
◆ request_check()
def request_check |
( |
|
self | ) |
|
Check the server's state soon.
◆ reset()
Clear the connection pool.
◆ run_operation_with_response()
def run_operation_with_response |
( |
|
self, |
|
|
|
sock_info, |
|
|
|
operation, |
|
|
|
set_slave_okay, |
|
|
|
listeners, |
|
|
|
exhaust, |
|
|
|
unpack_res |
|
) |
| |
Run a _Query or _GetMore operation and return a Response object.
This method is used only to run _Query/_GetMore operations from
cursors.
Can raise ConnectionFailure, OperationFailure, etc.
:Parameters:
- `operation`: A _Query or _GetMore object.
- `set_slave_okay`: Pass to operation.get_message.
- `all_credentials`: dict, maps auth source to MongoCredential.
- `listeners`: Instance of _EventListeners or None.
- `exhaust`: If True, then this is an exhaust cursor operation.
- `unpack_res`: A callable that decodes the wire protocol response.
The documentation for this class was generated from the following file:
- /home/passerat/Stage/flaskProject/venv/lib/python3.8/site-packages/pymongo/server.py