MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / __init__

Method __init__

cassandra/connection.py:1654–1667  ·  view source on GitHub ↗
(self, connection, owner)

Source from the content-addressed store, hash-verified

1652
1653class HeartbeatFuture(object):
1654 def __init__(self, connection, owner):
1655 self._exception = None
1656 self._event = Event()
1657 self.connection = connection
1658 self.owner = owner
1659 log.debug("Sending options message heartbeat on idle connection (%s) %s",
1660 id(connection), connection.endpoint)
1661 with connection.lock:
1662 if connection.in_flight < connection.max_request_id:
1663 connection.in_flight += 1
1664 connection.send_msg(OptionsMessage(), connection.get_request_id(), self._options_callback)
1665 else:
1666 self._exception = Exception("Failed to send heartbeat because connection 'in_flight' exceeds threshold")
1667 self._event.set()
1668
1669 def wait(self, timeout):
1670 self._event.wait(timeout)

Callers

nothing calls this directly

Calls 3

OptionsMessageClass · 0.90
get_request_idMethod · 0.80
send_msgMethod · 0.45

Tested by

no test coverage detected