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

Method cancel

cassandra/connection.py:580–594  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

578 self.on_error(response)
579
580 def cancel(self):
581 try:
582 log.debug("Canceling paging session %s from %s", self.stream_id, self.connection.host)
583 with self.connection.lock:
584 self.connection.send_msg(ReviseRequestMessage(ReviseRequestMessage.RevisionType.PAGING_CANCEL,
585 self.stream_id),
586 self.connection.get_request_id(),
587 self._on_cancel_response)
588 except ConnectionShutdown:
589 log.debug("Failed to cancel session %s from %s, connection is shutdown",
590 self.stream_id, self.connection.host)
591
592 with self._condition:
593 self._stop = True
594 self._condition.notify()
595
596 def _on_cancel_response(self, response):
597 if isinstance(response, ResultMessage):

Callers

nothing calls this directly

Calls 4

get_request_idMethod · 0.80
notifyMethod · 0.80
send_msgMethod · 0.45

Tested by

no test coverage detected