@@ -320,14 +320,39 @@ def __init__(self, hosts_or_uri=None, max_pool_size=10,
320320 this replica set. Can be passed as a keyword argument or as a
321321 MongoDB URI option.
322322
323- **Other optional parameters can be passed as keyword arguments:**
323+ | **Other optional parameters can be passed as keyword arguments:**
324+
325+ - `host`: For compatibility with :class:`~mongo_client.MongoClient`.
326+ If both `host` and `hosts_or_uri` are specified `host` takes
327+ precedence.
328+ - `port`: For compatibility with :class:`~mongo_client.MongoClient`.
329+ The default port number to use for hosts.
330+ - `socketTimeoutMS`: (integer) How long (in milliseconds) a send or
331+ receive on a socket can take before timing out.
332+ - `connectTimeoutMS`: (integer) How long (in milliseconds) a
333+ connection can take to be opened before timing out.
334+ - `auto_start_request`: If ``True``, each thread that accesses
335+ this :class:`MongoReplicaSetClient` has a socket allocated to it
336+ for the thread's lifetime, for each member of the set. For
337+ :class:`~pymongo.read_preferences.ReadPreference` PRIMARY,
338+ auto_start_request=True ensures consistent reads, even if you read
339+ after an unacknowledged write. For read preferences other than
340+ PRIMARY, there are no consistency guarantees. Default to ``False``.
341+ - `use_greenlets`: If ``True``, use a background Greenlet instead of
342+ a background thread to monitor state of replica set. Additionally,
343+ :meth:`start_request()` assigns a greenlet-local, rather than
344+ thread-local, socket.
345+ `use_greenlets` with :class:`MongoReplicaSetClient` requires
346+ `Gevent <http://gevent.org/>`_ to be installed.
347+
348+ | **Write Concern options:**
324349
325350 - `w`: (integer or string) Write operations will block until they have
326351 been replicated to the specified number or tagged set of servers.
327352 `w=<int>` always includes the replica set primary (e.g. w=3 means
328353 write to the primary and wait until replicated to **two**
329- secondaries). ** Passing w=0 disables write acknowledgement and all
330- other write concern options.**
354+ secondaries). Passing w=0 ** disables write acknowledgement** and all
355+ other write concern options.
331356 - `wtimeout`: (integer) Used in conjunction with `w`. Specify a value
332357 in milliseconds to control how long to wait for write propagation
333358 to complete. If replication does not complete in the given
@@ -337,13 +362,12 @@ def __init__(self, hosts_or_uri=None, max_pool_size=10,
337362 - `fsync`: If ``True`` force the database to fsync all files before
338363 returning. When used with `j` the server awaits the next group
339364 commit before returning.
340- - `socketTimeoutMS`: (integer) How long (in milliseconds) a send or
341- receive on a socket can take before timing out.
342- - `connectTimeoutMS`: (integer) How long (in milliseconds) a
343- connection can take to be opened before timing out.
344- - `ssl`: If ``True``, create the connection to the servers using SSL.
365+
366+ | **Read preference options:**
367+
345368 - `read_preference`: The read preference for this client.
346369 See :class:`~pymongo.read_preferences.ReadPreference` for available
370+ options.
347371 - `tag_sets`: Read from replica-set members with these tags.
348372 To specify a priority-order for tag sets, provide a list of
349373 tag sets: ``[{'dc': 'ny'}, {'dc': 'la'}, {}]``. A final, empty tag
@@ -354,24 +378,12 @@ def __init__(self, hosts_or_uri=None, max_pool_size=10,
354378 - `secondary_acceptable_latency_ms`: (integer) Any replica-set member
355379 whose ping time is within secondary_acceptable_latency_ms of the
356380 nearest member may accept reads. Default 15 milliseconds.
357- - `auto_start_request`: If ``True`, each thread that accesses
358- this :class:`MongoReplicaSetClient` has a socket allocated to it
359- for the thread's lifetime, for each member of the set. For
360- :class:`~pymongo.read_preferences.ReadPreference` PRIMARY,
361- auto_start_request=True ensures consistent reads, even if you read
362- after an unacknowledged write. For read preferences other than PRIMARY,
363- there are no consistency guarantees. Default to ``False``.
364- - `use_greenlets`: If ``True``, use a background Greenlet instead of
365- a background thread to monitor state of replica set. Additionally,
366- :meth:`start_request()` assigns a greenlet-local, rather than
367- thread-local, socket.
368- `use_greenlets` with :class:`MongoReplicaSetClient` requires
369- `Gevent <http://gevent.org/>`_ to be installed.
370- - `host`: For compatibility with :class:`~mongo_client.MongoClient`.
371- If both `host` and `hosts_or_uri` are specified `host` takes
372- precedence.
373- - `port`: For compatibility with :class:`~mongo_client.MongoClient`.
374- The default port number to use for hosts.
381+ **Ignored by mongos** and must be configured on the command line.
382+ See the localThreshold_ option for more information.
383+
384+ | **SSL configuration:**
385+
386+ - `ssl`: If ``True``, create the connection to the servers using SSL.
375387 - `ssl_keyfile`: The private keyfile used to identify the local
376388 connection against mongod. If included with the ``certfile` then
377389 only the ``ssl_certfile`` is needed. Implies ``ssl=True``.
@@ -393,6 +405,8 @@ def __init__(self, hosts_or_uri=None, max_pool_size=10,
393405 .. versionchanged:: 2.4.2+
394406 Added addtional ssl options
395407 .. versionadded:: 2.4
408+
409+ .. _localThreshold: http://docs.mongodb.org/manual/reference/mongos/#cmdoption-mongos--localThreshold
396410 """
397411 self .__opts = {}
398412 self .__seeds = set ()
0 commit comments