Read only connection pool options for an AsyncMongoClient/MongoClient. Should not be instantiated directly by application developers. Access a client's pool options via :attr:`~pymongo.client_options.ClientOptions.pool_options` instead:: pool_opts = client.options.pool_options
| 262 | |
| 263 | |
| 264 | class PoolOptions: |
| 265 | """Read only connection pool options for an AsyncMongoClient/MongoClient. |
| 266 | |
| 267 | Should not be instantiated directly by application developers. Access |
| 268 | a client's pool options via |
| 269 | :attr:`~pymongo.client_options.ClientOptions.pool_options` instead:: |
| 270 | |
| 271 | pool_opts = client.options.pool_options |
| 272 | pool_opts.max_pool_size |
| 273 | pool_opts.min_pool_size |
| 274 | |
| 275 | """ |
| 276 | |
| 277 | __slots__ = ( |
| 278 | "__max_pool_size", |
| 279 | "__min_pool_size", |
| 280 | "__max_idle_time_seconds", |
| 281 | "__connect_timeout", |
| 282 | "__socket_timeout", |
| 283 | "__wait_queue_timeout", |
| 284 | "__ssl_context", |
| 285 | "__tls_allow_invalid_hostnames", |
| 286 | "__event_listeners", |
| 287 | "__appname", |
| 288 | "__driver", |
| 289 | "__metadata", |
| 290 | "__compression_settings", |
| 291 | "__max_connecting", |
| 292 | "__pause_enabled", |
| 293 | "__server_api", |
| 294 | "__load_balanced", |
| 295 | "__credentials", |
| 296 | ) |
| 297 | |
| 298 | def __init__( |
| 299 | self, |
| 300 | max_pool_size: int = MAX_POOL_SIZE, |
| 301 | min_pool_size: int = MIN_POOL_SIZE, |
| 302 | max_idle_time_seconds: Optional[int] = MAX_IDLE_TIME_SEC, |
| 303 | connect_timeout: Optional[float] = None, |
| 304 | socket_timeout: Optional[float] = None, |
| 305 | wait_queue_timeout: Optional[int] = WAIT_QUEUE_TIMEOUT, |
| 306 | ssl_context: Optional[SSLContext] = None, |
| 307 | tls_allow_invalid_hostnames: bool = False, |
| 308 | event_listeners: Optional[_EventListeners] = None, |
| 309 | appname: Optional[str] = None, |
| 310 | driver: Optional[DriverInfo] = None, |
| 311 | compression_settings: Optional[CompressionSettings] = None, |
| 312 | max_connecting: int = MAX_CONNECTING, |
| 313 | pause_enabled: bool = True, |
| 314 | server_api: Optional[ServerApi] = None, |
| 315 | load_balanced: Optional[bool] = None, |
| 316 | credentials: Optional[MongoCredential] = None, |
| 317 | is_sync: Optional[bool] = True, |
| 318 | ): |
| 319 | self.__max_pool_size = max_pool_size |
| 320 | self.__min_pool_size = min_pool_size |
| 321 | self.__max_idle_time_seconds = max_idle_time_seconds |
no outgoing calls