Class: Monga::Protocol::KillCursors
- Defined in:
- lib/monga/protocol/kill_cursors.rb
Constant Summary
Constants inherited from Request
Request::FLAGS, Request::OP_CODES
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(connection, options = {}) ⇒ KillCursors
constructor
A new instance of KillCursors.
Methods inherited from Request
#callback_perform, #command, #header, #parse_response, #perform
Constructor Details
#initialize(connection, options = {}) ⇒ KillCursors
Returns a new instance of KillCursors.
5 6 7 8 9 |
# File 'lib/monga/protocol/kill_cursors.rb', line 5 def initialize(connection, = {}) @options = @request_id = self.class.request_id @connection = connection end |
Instance Method Details
#body ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/monga/protocol/kill_cursors.rb', line 11 def body @body ||= begin cursor_ids = @options[:cursor_ids] msg = ::BinUtils.append_int32_le!(nil, 0, cursor_ids.size) ::BinUtils.append_int64_le!(msg, 0, *cursor_ids) msg end end |