function _constructStartNewInstances(opts) {
        self.name  = opts.name || "testReplSet";
        print('Starting new replica set ' + self.name);

        self.useHostName = opts.useHostName == undefined ? true : opts.useHostName;
        self.host  = self.useHostName ? (opts.host || getHostName()) : 'localhost';
        self.oplogSize = opts.oplogSize || 40;
        self.useSeedList = opts.useSeedList || false;
        self.keyFile = opts.keyFile;
        self.shardSvr = opts.shardSvr || false;
        self.protocolVersion = opts.protocolVersion;

        _useBridge = opts.useBridge || false;
        _bridgeOptions = opts.bridgeOptions || {};

        _configSettings = opts.settings || false;

        self.nodeOptions = {};

        var numNodes;

        if (isObject(opts.nodes)) {
            var len = 0;
            for(var i in opts.nodes) {
                var options = self.nodeOptions["n" + len] = Object.merge(opts.nodeOptions,
                                                                           opts.nodes[i]);
                if (i.startsWith("a")) {
                    options.arbiter = true;
                }

                len++;
            }

            numNodes = len;
        }
        else if (Array.isArray(opts.nodes)) {
            for(var i = 0; i < opts.nodes.length; i++) {
                self.nodeOptions["n" + i] = Object.merge(opts.nodeOptions, opts.nodes[i]);
            }

            numNodes = opts.nodes.length;
        }
        else {
            for (var i = 0; i < opts.nodes; i++) {
                self.nodeOptions["n" + i] = opts.nodeOptions;
            }

            numNodes = opts.nodes;
        }

        self.ports = allocatePorts(numNodes);
        self.nodes = [];

        if (_useBridge) {
            _unbridgedPorts = allocatePorts(numNodes);
            _unbridgedNodes = [];
        }
    }
/**
     * Constructor, which initializes the ReplSetTest object by starting new instances.
     */
Constructor, which initializes the ReplSetTest object by starting new instances.
Constructor which initializes the ReplSetTest object by starting new instances .
function _constructStartNewInstances(opts) {
        self.name  = opts.name || "testReplSet";
        print('Starting new replica set ' + self.name);
        self.useHostName = opts.useHostName == undefined ? true : opts.useHostName;
        self.host  = self.useHostName ? (opts.host || getHostName()) : 'localhost';
        self.oplogSize = opts.oplogSize || 40;
        self.useSeedList = opts.useSeedList || false;
        self.keyFile = opts.keyFile;
        self.shardSvr = opts.shardSvr || false;
        self.protocolVersion = opts.protocolVersion;
        _useBridge = opts.useBridge || false;
        _bridgeOptions = opts.bridgeOptions || {};
        _configSettings = opts.settings || false;
        self.nodeOptions = {};
        var numNodes;
        if (isObject(opts.nodes)) {
            var len = 0;
            for(var i in opts.nodes) {
                var options = self.nodeOptions["n" + len] = Object.merge(opts.nodeOptions,
                                                                           opts.nodes[i]);
                if (i.startsWith("a")) {
                    options.arbiter = true;
                }
                len++;
            }
            numNodes = len;
        }
        else if (Array.isArray(opts.nodes)) {
            for(var i = 0; i < opts.nodes.length; i++) {
                self.nodeOptions["n" + i] = Object.merge(opts.nodeOptions, opts.nodes[i]);
            }
            numNodes = opts.nodes.length;
        }
        else {
            for (var i = 0; i < opts.nodes; i++) {
                self.nodeOptions["n" + i] = opts.nodeOptions;
            }
            numNodes = opts.nodes;
        }
        self.ports = allocatePorts(numNodes);
        self.nodes = [];
        if (_useBridge) {
            _unbridgedPorts = allocatePorts(numNodes);
            _unbridgedNodes = [];
        }
    }
function _constructStartNewInstances ( opts ) { self . name = opts . name || "testReplSet" ; print ( 'Starting new replica set ' + self . name ) ; self . useHostName = opts . useHostName == undefined ? true : opts . useHostName ; self . host = self . useHostName ? ( opts . host || getHostName ( ) ) : 'localhost' ; self . oplogSize = opts . oplogSize || 40 ; self . useSeedList = opts . useSeedList || false ; self . keyFile = opts . keyFile ; self . shardSvr = opts . shardSvr || false ; self . protocolVersion = opts . protocolVersion ; _useBridge = opts . useBridge || false ; _bridgeOptions = opts . bridgeOptions || { } ; _configSettings = opts . settings || false ; self . nodeOptions = { } ; var numNodes ; if ( isObject ( opts . nodes ) ) { var len = 0 ; for ( var i in opts . nodes ) { var options = self . nodeOptions [ "n" + len ] = Object . merge ( opts . nodeOptions , opts . nodes [ i ] ) ; if ( i . startsWith ( "a" ) ) { options . arbiter = true ; } len ++ ; } numNodes = len ; } else if ( Array . isArray ( opts . nodes ) ) { for ( var i = 0 ; i < opts . nodes . length ; i ++ ) { self . nodeOptions [ "n" + i ] = Object . merge ( opts . nodeOptions , opts . nodes [ i ] ) ; } numNodes = opts . nodes . length ; } else { for ( var i = 0 ; i < opts . nodes ; i ++ ) { self . nodeOptions [ "n" + i ] = opts . nodeOptions ; } numNodes = opts . nodes ; } self . ports = allocatePorts ( numNodes ) ; self . nodes = [ ] ; if ( _useBridge ) { _unbridgedPorts = allocatePorts ( numNodes ) ; _unbridgedNodes = [ ] ; } }
Constructor, which initializes the ReplSetTest object by starting new instances.
Constructor which initializes the ReplSetTest object by starting new instances .