Class: Mongo::Cursor::KillSpec Private
- Inherits:
-
Object
- Object
- Mongo::Cursor::KillSpec
- Defined in:
- build/ruby-driver-v2.19/lib/mongo/cursor/kill_spec.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This class contains the operation specification for KillCursors.
Its purpose is to ensure we don’t misspell attribute names accidentally.
Instance Attribute Summary collapse
- #coll_name ⇒ Object readonly private
- #connection_global_id ⇒ Object readonly private
- #cursor_id ⇒ Object readonly private
- #db_name ⇒ Object readonly private
- #server_address ⇒ Object readonly private
- #session ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Object private
- #eql?(other) ⇒ Boolean private
- #hash ⇒ Object private
-
#initialize(cursor_id:, coll_name:, db_name:, connection_global_id:, server_address:, session:) ⇒ KillSpec
constructor
private
A new instance of KillSpec.
Constructor Details
#initialize(cursor_id:, coll_name:, db_name:, connection_global_id:, server_address:, session:) ⇒ KillSpec
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of KillSpec.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'build/ruby-driver-v2.19/lib/mongo/cursor/kill_spec.rb', line 28 def initialize( cursor_id:, coll_name:, db_name:, connection_global_id:, server_address:, session: ) @cursor_id = cursor_id @coll_name = coll_name @db_name = db_name @connection_global_id = connection_global_id @server_address = server_address @session = session end |
Instance Attribute Details
#coll_name ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'build/ruby-driver-v2.19/lib/mongo/cursor/kill_spec.rb', line 44 def coll_name @coll_name end |
#connection_global_id ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'build/ruby-driver-v2.19/lib/mongo/cursor/kill_spec.rb', line 44 def connection_global_id @connection_global_id end |
#cursor_id ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'build/ruby-driver-v2.19/lib/mongo/cursor/kill_spec.rb', line 44 def cursor_id @cursor_id end |
#db_name ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'build/ruby-driver-v2.19/lib/mongo/cursor/kill_spec.rb', line 44 def db_name @db_name end |
#server_address ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'build/ruby-driver-v2.19/lib/mongo/cursor/kill_spec.rb', line 44 def server_address @server_address end |
#session ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'build/ruby-driver-v2.19/lib/mongo/cursor/kill_spec.rb', line 44 def session @session end |
Instance Method Details
#==(other) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
51 52 53 54 55 56 57 58 |
# File 'build/ruby-driver-v2.19/lib/mongo/cursor/kill_spec.rb', line 51 def ==(other) cursor_id == other.cursor_id && coll_name == other.coll_name && db_name == other.db_name && connection_global_id == other.connection_global_id && server_address == other.server_address && session == other.session end |
#eql?(other) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
60 61 62 |
# File 'build/ruby-driver-v2.19/lib/mongo/cursor/kill_spec.rb', line 60 def eql?(other) self.==(other) end |
#hash ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
64 65 66 67 68 69 70 71 72 73 |
# File 'build/ruby-driver-v2.19/lib/mongo/cursor/kill_spec.rb', line 64 def hash [ cursor_id, coll_name, db_name, connection_global_id, server_address, session, ].compact.hash end |