Class: Mongo::ShardedConnection Deprecated

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

Overview

Deprecated.

Use Mongo::MongoShardedClient instead. Support will be removed after v2.0

Please see old documentation for the ShardedConnection class

Constant Summary

Constants inherited from MongoShardedClient

MongoShardedClient::SHARDED_CLUSTER_OPTS

Constants inherited from MongoReplicaSetClient

MongoReplicaSetClient::REPL_SET_OPTS

Constants included from ReadPreference

ReadPreference::MONGOS_MODES, ReadPreference::READ_PREFERENCES

Constants inherited from MongoClient

MongoClient::CLIENT_ONLY_OPTS, MongoClient::ConditionVariable, MongoClient::DEFAULT_DB_NAME, MongoClient::DEFAULT_HOST, MongoClient::DEFAULT_PORT, MongoClient::GENERIC_OPTS, MongoClient::Mutex, MongoClient::POOL_OPTS, MongoClient::READ_PREFERENCE_OPTS, MongoClient::TIMEOUT_OPTS, MongoClient::WRITE_CONCERN_OPTS

Constants included from Networking

Networking::RESPONSE_HEADER_SIZE, Networking::STANDARD_HEADER_SIZE

Instance Attribute Summary

Attributes inherited from MongoShardedClient

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

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, #op_timeout, #pool_size, #pool_timeout, #primary, #primary_pool, #read, #size, #socket_class, #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 MongoShardedClient

#checkout, #connect, #connected?, from_uri, #hard_refresh!, #inspect, #slave_ok?, #valid_opts

Methods included from ThreadLocalVariableManager

#thread_local

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, #nodes, #pin_pool, #pinned_pool, #port, #primary, #primary_pool, #read_primary?, #refresh, #reset_connection, #secondaries, #secondary_pool, #secondary_pools, #slave_ok?, #tag_map, #unpin_pool, #valid_opts

Methods included from ReadPreference

mongos, #read_pool, #read_preference, #select_near_pool, #select_pool, #select_secondary_pool, validate

Methods inherited from MongoClient

#[], #active?, #add_auth, #apply_saved_authentication, #authenticate_pools, #checkin, #checkout_reader, #checkout_writer, #clear_auths, #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, #parse_init, #pin_pool, #ping, #pinned_pool, #port, #read_pool, #read_primary?, #refresh, #remove_auth, #server_info, #server_version, #slave_ok?, #unlock!, #unpin_pool

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

#initialize(*args) ⇒ ShardedConnection

Returns a new instance of ShardedConnection.



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