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

Different managers 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 connection by calling pymongo.connection.Connection.set_cursor_manager.

class pymongo.cursor_manager.BatchCursorManager(connection)

Instantiate the manager.

Parameters:
  • connection: a Mongo Connection
close(cursor_id)

Close a cursor by killing it in a batch.

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

Parameters:
  • cursor_id: cursor id to close
class pymongo.cursor_manager.CursorManager(connection)

Instantiate the manager.

Parameters:
  • connection: a Mongo Connection
close(cursor_id)

Close a cursor by killing it immediately.

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

Parameters:
  • cursor_id: cursor id to close

Previous topic

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

Next topic

bson – MOVED

This Page