Class: Mongo::ServerSelector::Primary
- Inherits:
-
Object
- Object
- Mongo::ServerSelector::Primary
- Includes:
- Selectable
- Defined in:
- lib/mongo/server_selector/primary.rb
Overview
Encapsulates specifications for selecting the primary server given a list
of candidates.
Instance Attribute Summary
Attributes included from Selectable
Instance Method Summary collapse
-
#name ⇒ Symbol
Get the name of the server mode type.
-
#slave_ok? ⇒ false
Whether the slaveOk bit should be set on wire protocol messages.
-
#tags_allowed? ⇒ false
Whether tag sets are allowed to be defined for this server preference.
-
#to_mongos ⇒ nil
Convert this server preference definition into a format appropriate for a mongos server.
Methods included from Selectable
#==, #initialize, #inspect, #local_threshold, #select_server, #server_selection_timeout
Instance Method Details
#name ⇒ Symbol
Get the name of the server mode type.
34 35 36 |
# File 'lib/mongo/server_selector/primary.rb', line 34 def name :primary end |
#slave_ok? ⇒ false
Whether the slaveOk bit should be set on wire protocol messages.
I.e. whether the operation can be performed on a secondary server.
44 45 46 |
# File 'lib/mongo/server_selector/primary.rb', line 44 def slave_ok? false end |
#tags_allowed? ⇒ false
Whether tag sets are allowed to be defined for this server preference.
53 54 55 |
# File 'lib/mongo/server_selector/primary.rb', line 53 def false end |
#to_mongos ⇒ nil
Convert this server preference definition into a format appropriate
for a mongos server.
68 69 70 |
# File 'lib/mongo/server_selector/primary.rb', line 68 def to_mongos nil end |