Class: Moped::Protocol::KillCursors
- Includes:
- Message
- Defined in:
- lib/moped/protocol/kill_cursors.rb
Overview
The Protocol class for killing active cursors.
Instance Attribute Summary collapse
-
#cursor_ids ⇒ Array
The cursor ids to kill.
-
#length ⇒ Number
The length of the message.
-
#number_of_cursor_ids ⇒ Number
The number of cursor ids.
-
#op_code ⇒ Number
OP_KILL_CURSORS operation code (2007).
-
#request_id ⇒ Number
The request id of the message.
Instance Method Summary collapse
-
#initialize(cursor_ids, options = {}) ⇒ KillCursors
constructor
Create a new command to kill cursors.
- #log_inspect ⇒ Object
Methods included from Message
included, #inspect, #receive_replies, #serialize
Constructor Details
#initialize(cursor_ids, options = {}) ⇒ KillCursors
Create a new command to kill cursors.
51 52 53 54 55 |
# File 'lib/moped/protocol/kill_cursors.rb', line 51 def initialize(cursor_ids, = {}) @cursor_ids = cursor_ids @number_of_cursor_ids = cursor_ids.length @request_id = [:request_id] end |
Instance Attribute Details
#cursor_ids ⇒ Array
Returns the cursor ids to kill.
36 |
# File 'lib/moped/protocol/kill_cursors.rb', line 36 int64 :cursor_ids, type: :array |
#length ⇒ Number
Returns the length of the message.
16 |
# File 'lib/moped/protocol/kill_cursors.rb', line 16 int32 :length |
#number_of_cursor_ids ⇒ Number
Returns the number of cursor ids.
32 |
# File 'lib/moped/protocol/kill_cursors.rb', line 32 int32 :number_of_cursor_ids |
#op_code ⇒ Number
Returns OP_KILL_CURSORS operation code (2007).
26 |
# File 'lib/moped/protocol/kill_cursors.rb', line 26 int32 :op_code |
#request_id ⇒ Number
Returns the request id of the message.
20 |
# File 'lib/moped/protocol/kill_cursors.rb', line 20 int32 :request_id |
Instance Method Details
#log_inspect ⇒ Object
57 58 59 60 61 |
# File 'lib/moped/protocol/kill_cursors.rb', line 57 def log_inspect type = "KILL_CURSORS" "%-12s cursor_ids=%s" % [type, cursor_ids.inspect] end |