'Sets a threshold for concurrent requests per connection, above which new
connections will be created to a host (up to max connections;
see :meth:`~Cluster.set_max_connections_per_host`).
Pertains to connection pool management in protocol versions {1,2}.'

def set_max_requests_per_connection(self, host_distance, max_requests):

    if (self.protocol_version >= 3):
        raise UnsupportedOperation('Cluster.set_max_requests_per_connection()    only    has    an    effect    when    using    protocol_version    1    or    2.')
    if ((max_requests < 1) or (max_requests > 127) or (max_requests <= self._min_requests_per_connection[host_distance])):
        raise ValueError(('max_requests    must    be    1-127    and    greater    than    the    min_requests    for    this    host_distance    (%d)' % (self._min_requests_per_connection[host_distance],)))
    self._max_requests_per_connection[host_distance] = max_requests
