MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / _get_host_by_address

Method _get_host_by_address

cassandra/metadata.py:352–358  ·  view source on GitHub ↗
(self, address, port=None)

Source from the content-addressed store, hash-verified

350 return self._hosts.get(endpoint_or_address)
351
352 def _get_host_by_address(self, address, port=None):
353 for host in self._hosts.values():
354 if (host.broadcast_rpc_address == address and
355 (port is None or host.broadcast_rpc_port is None or host.broadcast_rpc_port == port)):
356 return host
357
358 return None
359
360 def all_hosts(self):
361 """

Callers 1

get_hostMethod · 0.95

Calls 1

valuesMethod · 0.45

Tested by

no test coverage detected