@@ -1452,18 +1452,6 @@ def __init__(self,
14521452
14531453 self ._user_types = defaultdict (dict )
14541454
1455- self ._min_requests_per_connection = {
1456- HostDistance .LOCAL_RACK : DEFAULT_MIN_REQUESTS ,
1457- HostDistance .LOCAL : DEFAULT_MIN_REQUESTS ,
1458- HostDistance .REMOTE : DEFAULT_MIN_REQUESTS
1459- }
1460-
1461- self ._max_requests_per_connection = {
1462- HostDistance .LOCAL_RACK : DEFAULT_MAX_REQUESTS ,
1463- HostDistance .LOCAL : DEFAULT_MAX_REQUESTS ,
1464- HostDistance .REMOTE : DEFAULT_MAX_REQUESTS
1465- }
1466-
14671455 self ._core_connections_per_host = {
14681456 HostDistance .LOCAL_RACK : DEFAULT_MIN_CONNECTIONS_PER_LOCAL_HOST ,
14691457 HostDistance .LOCAL : DEFAULT_MIN_CONNECTIONS_PER_LOCAL_HOST ,
@@ -1666,48 +1654,6 @@ def add_execution_profile(self, name, profile, pool_wait_timeout=5):
16661654 if not_done :
16671655 raise OperationTimedOut ("Failed to create all new connection pools in the %ss timeout." )
16681656
1669- def get_min_requests_per_connection (self , host_distance ):
1670- return self ._min_requests_per_connection [host_distance ]
1671-
1672- def set_min_requests_per_connection (self , host_distance , min_requests ):
1673- """
1674- Sets a threshold for concurrent requests per connection, below which
1675- connections will be considered for disposal (down to core connections;
1676- see :meth:`~Cluster.set_core_connections_per_host`).
1677-
1678- Pertains to connection pool management in protocol versions {1,2}.
1679- """
1680- if self .protocol_version >= 3 :
1681- raise UnsupportedOperation (
1682- "Cluster.set_min_requests_per_connection() only has an effect "
1683- "when using protocol_version 1 or 2." )
1684- if min_requests < 0 or min_requests > 126 or \
1685- min_requests >= self ._max_requests_per_connection [host_distance ]:
1686- raise ValueError ("min_requests must be 0-126 and less than the max_requests for this host_distance (%d)" %
1687- (self ._min_requests_per_connection [host_distance ],))
1688- self ._min_requests_per_connection [host_distance ] = min_requests
1689-
1690- def get_max_requests_per_connection (self , host_distance ):
1691- return self ._max_requests_per_connection [host_distance ]
1692-
1693- def set_max_requests_per_connection (self , host_distance , max_requests ):
1694- """
1695- Sets a threshold for concurrent requests per connection, above which new
1696- connections will be created to a host (up to max connections;
1697- see :meth:`~Cluster.set_max_connections_per_host`).
1698-
1699- Pertains to connection pool management in protocol versions {1,2}.
1700- """
1701- if self .protocol_version >= 3 :
1702- raise UnsupportedOperation (
1703- "Cluster.set_max_requests_per_connection() only has an effect "
1704- "when using protocol_version 1 or 2." )
1705- if max_requests < 1 or max_requests > 127 or \
1706- max_requests <= self ._min_requests_per_connection [host_distance ]:
1707- raise ValueError ("max_requests must be 1-127 and greater than the min_requests for this host_distance (%d)" %
1708- (self ._min_requests_per_connection [host_distance ],))
1709- self ._max_requests_per_connection [host_distance ] = max_requests
1710-
17111657 def get_core_connections_per_host (self , host_distance ):
17121658 """
17131659 Gets the minimum number of connections per Session that will be opened
0 commit comments