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

Class _ControlReconnectionHandler

cassandra/cluster.py:3481–3502  ·  view source on GitHub ↗

Internal

Source from the content-addressed store, hash-verified

3479
3480
3481class _ControlReconnectionHandler(_ReconnectionHandler):
3482 """
3483 Internal
3484 """
3485
3486 def __init__(self, control_connection, *args, **kwargs):
3487 _ReconnectionHandler.__init__(self, *args, **kwargs)
3488 self.control_connection = weakref.proxy(control_connection)
3489
3490 def try_reconnect(self):
3491 return self.control_connection._reconnect_internal()
3492
3493 def on_reconnection(self, connection):
3494 self.control_connection._set_new_connection(connection)
3495
3496 def on_exception(self, exc, next_delay):
3497 # TODO only overridden to add logging, so add logging
3498 if isinstance(exc, AuthenticationFailed):
3499 return False
3500 else:
3501 log.debug("Error trying to reconnect control connection: %r", exc)
3502 return True
3503
3504
3505def _watch_callback(obj_weakref, method_name, *args, **kwargs):

Callers 1

_reconnectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected