Note that core/max conn limits are per-Session
This commit is contained in:
@@ -383,18 +383,18 @@ class Cluster(object):
|
|||||||
|
|
||||||
def get_core_connections_per_host(self, host_distance):
|
def get_core_connections_per_host(self, host_distance):
|
||||||
"""
|
"""
|
||||||
Gets the minimum number of connections that will be opened for each
|
Gets the minimum number of connections per Session that will be opened
|
||||||
host with :class:`~.HostDistance` equal to `host_distance`. The default
|
for each host with :class:`~.HostDistance` equal to `host_distance`.
|
||||||
is 2 for :attr:`~HostDistance.LOCAL` and 1 for
|
The default is 2 for :attr:`~HostDistance.LOCAL` and 1 for
|
||||||
:attr:`~HostDistance.REMOTE`.
|
:attr:`~HostDistance.REMOTE`.
|
||||||
"""
|
"""
|
||||||
return self._core_connections_per_host[host_distance]
|
return self._core_connections_per_host[host_distance]
|
||||||
|
|
||||||
def set_core_connections_per_host(self, host_distance, core_connections):
|
def set_core_connections_per_host(self, host_distance, core_connections):
|
||||||
"""
|
"""
|
||||||
Sets the minimum number of connections that will be opened for each
|
Sets the minimum number of connections per Session that will be opened
|
||||||
host with :class:`~.HostDistance` equal to `host_distance`. The default
|
for each host with :class:`~.HostDistance` equal to `host_distance`.
|
||||||
is 2 for :attr:`~HostDistance.LOCAL` and 1 for
|
The default is 2 for :attr:`~HostDistance.LOCAL` and 1 for
|
||||||
:attr:`~HostDistance.REMOTE`.
|
:attr:`~HostDistance.REMOTE`.
|
||||||
"""
|
"""
|
||||||
old = self._core_connections_per_host[host_distance]
|
old = self._core_connections_per_host[host_distance]
|
||||||
@@ -404,18 +404,18 @@ class Cluster(object):
|
|||||||
|
|
||||||
def get_max_connections_per_host(self, host_distance):
|
def get_max_connections_per_host(self, host_distance):
|
||||||
"""
|
"""
|
||||||
Gets the maximum number of connections that will be opened for each
|
Gets the maximum number of connections per Session that will be opened
|
||||||
host with :class:`~.HostDistance` equal to `host_distance`. The default
|
for each host with :class:`~.HostDistance` equal to `host_distance`.
|
||||||
is 8 for :attr:`~HostDistance.LOCAL` and 2 for
|
The default is 8 for :attr:`~HostDistance.LOCAL` and 2 for
|
||||||
:attr:`~HostDistance.REMOTE`.
|
:attr:`~HostDistance.REMOTE`.
|
||||||
"""
|
"""
|
||||||
return self._max_connections_per_host[host_distance]
|
return self._max_connections_per_host[host_distance]
|
||||||
|
|
||||||
def set_max_connections_per_host(self, host_distance, max_connections):
|
def set_max_connections_per_host(self, host_distance, max_connections):
|
||||||
"""
|
"""
|
||||||
Gets the maximum number of connections that will be opened for each
|
Gets the maximum number of connections per Session that will be opened
|
||||||
host with :class:`~.HostDistance` equal to `host_distance`. The default
|
for each host with :class:`~.HostDistance` equal to `host_distance`.
|
||||||
is 2 for :attr:`~HostDistance.LOCAL` and 1 for
|
The default is 2 for :attr:`~HostDistance.LOCAL` and 1 for
|
||||||
:attr:`~HostDistance.REMOTE`.
|
:attr:`~HostDistance.REMOTE`.
|
||||||
"""
|
"""
|
||||||
self._max_connections_per_host[host_distance] = max_connections
|
self._max_connections_per_host[host_distance] = max_connections
|
||||||
|
Reference in New Issue
Block a user