OpenQuizz
Une application de gestion des contenus pédagogiques
PoolOptions Class Reference
Inheritance diagram for PoolOptions:
Collaboration diagram for PoolOptions:

Public Member Functions

def __init__ (self, max_pool_size=MAX_POOL_SIZE, min_pool_size=MIN_POOL_SIZE, max_idle_time_seconds=MAX_IDLE_TIME_SEC, connect_timeout=None, socket_timeout=None, wait_queue_timeout=WAIT_QUEUE_TIMEOUT, wait_queue_multiple=None, ssl_context=None, ssl_match_hostname=True, socket_keepalive=True, event_listeners=None, appname=None, driver=None, compression_settings=None)
 
def non_default_options (self)
 
def max_pool_size (self)
 
def min_pool_size (self)
 
def max_idle_time_seconds (self)
 
def connect_timeout (self)
 
def socket_timeout (self)
 
def wait_queue_timeout (self)
 
def wait_queue_multiple (self)
 
def ssl_context (self)
 
def ssl_match_hostname (self)
 
def socket_keepalive (self)
 
def event_listeners (self)
 
def appname (self)
 
def driver (self)
 
def compression_settings (self)
 
def metadata (self)
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  max_pool_size = MAX_POOL_SIZE,
  min_pool_size = MIN_POOL_SIZE,
  max_idle_time_seconds = MAX_IDLE_TIME_SEC,
  connect_timeout = None,
  socket_timeout = None,
  wait_queue_timeout = WAIT_QUEUE_TIMEOUT,
  wait_queue_multiple = None,
  ssl_context = None,
  ssl_match_hostname = True,
  socket_keepalive = True,
  event_listeners = None,
  appname = None,
  driver = None,
  compression_settings = None 
)

Member Function Documentation

◆ appname()

def appname (   self)
The application name, for sending with ismaster in server handshake.

◆ compression_settings()

def compression_settings (   self)

◆ connect_timeout()

def connect_timeout (   self)
How long a connection can take to be opened before timing out.

◆ driver()

def driver (   self)
Driver name and version, for sending with ismaster in handshake.

◆ event_listeners()

def event_listeners (   self)
An instance of pymongo.monitoring._EventListeners.

◆ max_idle_time_seconds()

def max_idle_time_seconds (   self)
The maximum number of seconds that a connection can remain
idle in the pool before being removed and replaced. Defaults to
`None` (no limit).

◆ max_pool_size()

def max_pool_size (   self)
The maximum allowable number of concurrent connections to each
connected server. Requests to a server will block if there are
`maxPoolSize` outstanding connections to the requested server.
Defaults to 100. Cannot be 0.

When a server's pool has reached `max_pool_size`, operations for that
server block waiting for a socket to be returned to the pool. If
``waitQueueTimeoutMS`` is set, a blocked operation will raise
:exc:`~pymongo.errors.ConnectionFailure` after a timeout.
By default ``waitQueueTimeoutMS`` is not set.

◆ metadata()

def metadata (   self)
A dict of metadata about the application, driver, os, and platform.

◆ min_pool_size()

def min_pool_size (   self)
The minimum required number of concurrent connections that the pool
will maintain to each connected server. Default is 0.

◆ non_default_options()

def non_default_options (   self)
The non-default options this pool was created with.

Added for CMAP's :class:`PoolCreatedEvent`.

◆ socket_keepalive()

def socket_keepalive (   self)
Whether to send periodic messages to determine if a connection
is closed.

◆ socket_timeout()

def socket_timeout (   self)
How long a send or receive on a socket can take before timing out.

◆ ssl_context()

def ssl_context (   self)
An SSLContext instance or None.

◆ ssl_match_hostname()

def ssl_match_hostname (   self)
Call ssl.match_hostname if cert_reqs is not ssl.CERT_NONE.

◆ wait_queue_multiple()

def wait_queue_multiple (   self)
Multiplied by max_pool_size to give the number of threads allowed
to wait for a socket at one time.

◆ wait_queue_timeout()

def wait_queue_timeout (   self)
How long a thread will wait for a socket from the pool if the pool
has no free sockets.

The documentation for this class was generated from the following file: