cursor_manager – Managers to handle when cursors are killed after being closed

A manager to handle when cursors are killed after they are closed.

New cursor managers should be defined as subclasses of CursorManager and can be installed on a client by calling set_cursor_manager().

Changed in version 3.0: Undeprecated. close() now requires an address argument. The BatchCursorManager class is removed.

class pymongo.cursor_manager.CursorManager(client)

Instantiate the manager.

Parameters:
  • client: a MongoClient
close(cursor_id, address)

Kill a cursor.

Raises TypeError if cursor_id is not an instance of (int, long).

Parameters:
  • cursor_id: cursor id to close
  • address: the cursor’s server’s (host, port) pair

Changed in version 3.0: Now requires an address argument.

Previous topic

son_manipulator – Manipulators that can edit SON documents as they are saved or retrieved

Next topic

uri_parser – Tools to parse and validate a MongoDB URI

This Page