@@ -660,6 +660,13 @@ def get_min_requests_per_connection(self, host_distance):
660660 return self ._min_requests_per_connection [host_distance ]
661661
662662 def set_min_requests_per_connection (self , host_distance , min_requests ):
663+ """
664+ Sets a threshold for concurrent requests per connection, below which
665+ connections will be considered for disposal (down to core connections;
666+ see :meth:`~Cluster.set_core_connections_per_host`).
667+
668+ Pertains to connection pool management in protocol versions {1,2}.
669+ """
663670 if self .protocol_version >= 3 :
664671 raise UnsupportedOperation (
665672 "Cluster.set_min_requests_per_connection() only has an effect "
@@ -670,6 +677,13 @@ def get_max_requests_per_connection(self, host_distance):
670677 return self ._max_requests_per_connection [host_distance ]
671678
672679 def set_max_requests_per_connection (self , host_distance , max_requests ):
680+ """
681+ Sets a threshold for concurrent requests per connection, above which new
682+ connections will be created to a host (up to max connections;
683+ see :meth:`~Cluster.set_max_connections_per_host`).
684+
685+ Pertains to connection pool management in protocol versions {1,2}.
686+ """
673687 if self .protocol_version >= 3 :
674688 raise UnsupportedOperation (
675689 "Cluster.set_max_requests_per_connection() only has an effect "
@@ -695,6 +709,10 @@ def set_core_connections_per_host(self, host_distance, core_connections):
695709 The default is 2 for :attr:`~HostDistance.LOCAL` and 1 for
696710 :attr:`~HostDistance.REMOTE`.
697711
712+ Protocol version 1 and 2 are limited in the number of concurrent
713+ requests they can send per connection. The driver implements connection
714+ pooling to support higher levels of concurrency.
715+
698716 If :attr:`~.Cluster.protocol_version` is set to 3 or higher, this
699717 is not supported (there is always one connection per host, unless
700718 the host is remote and :attr:`connect_to_remote_hosts` is :const:`False`)
0 commit comments