Class: Mongo::Protocol::KillCursors
- Defined in:
- lib/mongo/protocol/kill_cursors.rb
Overview
MongoDB Wire protocol KillCursors message.
This is a client request message that is sent to the server in order to kill a number of cursors.
Defined Under Namespace
Classes: Upconverter
Constant Summary
Constants inherited from Message
Message::BATCH_SIZE, Message::COLLECTION, Message::LIMIT, Message::MAX_MESSAGE_SIZE, Message::ORDERED, Message::Q
Instance Attribute Summary
Attributes inherited from Message
Instance Method Summary collapse
-
#initialize(collection, database, cursor_ids) ⇒ KillCursors
constructor
Creates a new KillCursors message.
-
#payload ⇒ Hash
Return the event payload for monitoring.
Methods inherited from Message
#==, deserialize, #hash, #replyable?, #serialize, #set_request_id
Constructor Details
#initialize(collection, database, cursor_ids) ⇒ KillCursors
Creates a new KillCursors message
34 35 36 37 38 39 |
# File 'lib/mongo/protocol/kill_cursors.rb', line 34 def initialize(collection, database, cursor_ids) @database = database @cursor_ids = cursor_ids @id_count = @cursor_ids.size @upconverter = Upconverter.new(collection, cursor_ids) end |
Instance Method Details
#payload ⇒ Hash
Return the event payload for monitoring.
49 50 51 52 53 54 55 56 |
# File 'lib/mongo/protocol/kill_cursors.rb', line 49 def payload { command_name: 'killCursors', database_name: @database, command: upconverter.command, request_id: request_id } end |