Class: Mongo::ReplSetConnection Deprecated

Inherits:
MongoReplicaSetClient show all
Includes:
LegacyWriteConcern
Defined in:
lib/mongo/legacy.rb

Overview

Deprecated.

Use Mongo::MongoReplicaSetClient instead. Support will be removed after v2.0. Please see old documentation for the ReplSetConnection class.

Constant Summary

Constant Summary

Constants inherited from MongoReplicaSetClient

MongoReplicaSetClient::REPL_SET_OPTS

Constants included from ReadPreference

Mongo::ReadPreference::MONGOS_MODES, Mongo::ReadPreference::READ_PREFERENCES, Mongo::ReadPreference::SECONDARY_OK_COMMANDS

Constants inherited from MongoClient

MongoClient::AGG_RETURNS_CURSORS, MongoClient::APPEND_HEADROOM, MongoClient::BATCH_COMMANDS, MongoClient::CLIENT_ONLY_OPTS, MongoClient::COMMAND_HEADROOM, MongoClient::ConditionVariable, MongoClient::DEFAULT_DB_NAME, MongoClient::DEFAULT_HOST, MongoClient::DEFAULT_MAX_WRITE_BATCH_SIZE, MongoClient::DEFAULT_PORT, MongoClient::GENERIC_OPTS, MongoClient::MAX_WIRE_VERSION, MongoClient::MIN_WIRE_VERSION, MongoClient::Mutex, MongoClient::POOL_OPTS, MongoClient::READ_PREFERENCE_OPTS, MongoClient::RELEASE_2_4_AND_BEFORE, MongoClient::SERIALIZE_HEADROOM, MongoClient::SSL_OPTS, MongoClient::TIMEOUT_OPTS, MongoClient::WRITE_CONCERN_OPTS

Constants included from Authentication

Authentication::DEFAULT_MECHANISM, Authentication::EXTRA, Authentication::MECHANISMS

Constants included from WriteConcern

WriteConcern::DEFAULT_WRITE_CONCERN, WriteConcern::VALID_KEYS

Constants included from Networking

Networking::RESPONSE_HEADER_SIZE, Networking::STANDARD_HEADER_SIZE

Instance Attribute Summary

Attributes inherited from MongoReplicaSetClient

#manager, #refresh_interval, #refresh_mode, #refresh_version, #replica_set_name, #seeds

Attributes inherited from MongoClient

#acceptable_latency, #auths, #connect_timeout, #host_to_try, #logger, #max_wire_version, #max_write_batch_size, #min_wire_version, #op_timeout, #pool_size, #pool_timeout, #primary, #primary_pool, #read, #size, #socket_class, #socket_opts, #tag_sets, #write_concern

Attributes included from WriteConcern

#legacy_write_concern

Instance Method Summary (collapse)

Methods included from LegacyWriteConcern

from_uri, #safe, #safe=

Methods inherited from MongoReplicaSetClient

#arbiters, #authenticate_pools, #checkin, #checkout, #checkout_reader, #checkout_writer, #close, #connect, #connected?, #connecting?, #ensure_manager, #get_socket_from_pool, #hard_refresh!, #host, #hosts, #inspect, #local_manager, #logout_pools, #max_bson_size, #max_message_size, #max_wire_version, #max_write_batch_size, #min_wire_version, #nodes, #pin_pool, #pinned_pool, #pools, #port, #primary, #primary_pool, #primary_wire_version_feature?, #read_primary?, #refresh, #reset_connection, #secondaries, #secondary_pool, #secondary_pools, #slave_ok?, #tag_map, #unpin_pool, #valid_opts

Methods included from ThreadLocalVariableManager

#thread_local

Methods included from ReadPreference

cmd_read_pref, mongos, #read_pool, #read_preference, reroute_cmd_primary?, secondary_ok?, #select_near_pool, #select_pool, #select_secondary_pool, validate

Methods inherited from MongoClient

#[], #active?, #apply_saved_authentication, #authenticate_pools, #check_is_master, #checkin, #checkout_reader, #checkout_writer, #close, #connect, #connected?, #copy_database, #database_info, #database_names, #db, #drop_database, from_uri, #host, #host_port, #lock!, #locked?, #logout_pools, #max_bson_size, #max_message_size, #mongos?, multi, #pin_pool, #ping, #pinned_pool, #port, #primary_wire_version_feature?, #read_pool, #read_primary?, #refresh, #server_info, #server_version, #slave_ok?, #unlock!, #unpin_pool, #use_write_command?, #wire_version_feature?

Methods included from Authentication

#add_auth, auth_key, #clear_auths, hash_password, #issue_authentication, #issue_logout, #remove_auth, validate_credentials, validate_mechanism

Methods included from WriteConcern

#get_write_concern, gle?, #write_concern_from_legacy

Methods included from Networking

#receive_message, #send_message, #send_message_with_gle

Methods included from Logging

#instrument, instrumenter, instrumenter=, #log, #write_logging_startup_message

Constructor Details

- (ReplSetConnection) initialize(*args)

Returns a new instance of ReplSetConnection



62
63
64
65
66
67
68
69
# File 'lib/mongo/legacy.rb', line 62

def initialize(*args)
  if args.last.is_a?(Hash)
    opts = args.pop
    write_concern_from_legacy(opts)
    args.push(opts)
  end
  super
end