<inputtype="search"id="api-filter"placeholder="Type to filter APIs">
</div>
<divid="api-tabview-panel">
<ulid="api-classes"class="apis classes">
<li><ahref="../classes/Represents a
Replicaset Configuration.html">Represents a
Replicaset Configuration</a></li>
<li><ahref="../classes/Represents a BatchWriteResult.html">Represents a BatchWriteResult</a></li>
<li><ahref="../classes/Represents a Collection.html">Represents a Collection</a></li>
<li><ahref="../classes/Represents a Cursor..html">Represents a Cursor.</a></li>
<li><ahref="../classes/Represents a CursorStream..html">Represents a CursorStream.</a></li>
<li><ahref="../classes/Represents a Db.html">Represents a Db</a></li>
<li><ahref="../classes/Represents a GridFS File Stream..html">Represents a GridFS File Stream.</a></li>
<li><ahref="../classes/.html"></a></li>
<li><ahref="../classes/Represents a MongoClient.html">Represents a MongoClient</a></li>
<li><ahref="../classes/Represents a Mongos connection with failover to backup proxies.html">Represents a Mongos connection with failover to backup proxies</a></li>
<li><ahref="../classes/Represents a OrderedBulkOperation.html">Represents a OrderedBulkOperation</a></li>
<li><ahref="../classes/Represents a Read Preference..html">Represents a Read Preference.</a></li>
<li><ahref="../classes/Represents a Server connection..html">Represents a Server connection.</a></li>
<li><ahref="../classes/Represents a UnorderedBulkOperation.html">Represents a UnorderedBulkOperation</a></li>
<li><ahref="../classes/Represents the Admin methods of MongoDB..html">Represents the Admin methods of MongoDB.</a></li>
<li><ahref="../classes/Represents the Grid..html">Represents the Grid.</a></li>
<li><ahref="../classes/Represents the GridStore..html">Represents the GridStore.</a></li>
var server_name = format("%s:%s", _server.host, _server.port);
// Add the downed server
self.downServers[server_name] = _server;
// Remove the current server from the list
delete self.upServers[server_name];
// Emit close across all the attached db instances
if(Object.keys(self.upServers).length == 0) {
self._emitAcrossAllDbInstances(self, null, "close", new Error("mongos disconnected, no valid proxies contactable over tcp"), null, null);
}
}
}
// Mongo function
this.mongosCheckFunction = function() {
// Set as not waiting for check event
self._haInProgress = true;
// Servers down
var numberOfServersLeft = Object.keys(self.downServers).length;
// Check downed servers
if(numberOfServersLeft > 0) {
for(var name in self.downServers) {
// Pop a downed server
var downServer = self.downServers[name];
// Set up the connection options for a Mongos
var options = {
auto_reconnect: false,
returnIsMasterResults: true,
slaveOk: true,
poolSize: downServer.poolSize,
socketOptions: {
connectTimeoutMS: self._connectTimeoutMS,
socketTimeoutMS: self._socketTimeoutMS
}
}
// Create a new server object
var newServer = new Server(downServer.host, downServer.port, options);
// Setup the connection function
var connectFunction = function(_db, _server, _options, _callback) {