src/mongo/shell/replsettest.js
/**
     * Constructor, which instantiates the ReplSetTest object from existing nodes.
     */
Constructor, which instantiates the ReplSetTest object from existing nodes.
Constructor which instantiates the ReplSetTest object from existing nodes .
function _constructFromExistingNodes(
        {name, serverless, nodeHosts, nodeOptions, keyFile, host, waitForKeys}) {
        print('Recreating replica set from existing nodes ' + tojson(nodeHosts));
        self.name = name;
        self.serverless = serverless;
        self.ports = nodeHosts.map(node => node.split(':')[1]);
        self.nodes = nodeHosts.map((node) => {
            const conn = Mongo(node);
            conn.name = conn.host;
            return conn;
        });
        self.host = host;
        self.waitForKeys = waitForKeys;
        self.keyFile = keyFile;
        self.nodeOptions = nodeOptions;
    }
function _constructFromExistingNodes ( { name , serverless , nodeHosts , nodeOptions , keyFile , host , waitForKeys } ) { print ( 'Recreating replica set from existing nodes ' + tojson ( nodeHosts ) ) ; self . name = name ; self . serverless = serverless ; self . ports = nodeHosts . map ( node => node . split ( ':' ) [ 1 ] ) ; self . nodes = nodeHosts . map ( ( node ) => { const conn = Mongo ( node ) ; conn . name = conn . host ; return conn ; } ) ; self . host = host ; self . waitForKeys = waitForKeys ; self . keyFile = keyFile ; self . nodeOptions = nodeOptions ; }
Constructor, which instantiates the ReplSetTest object from existing nodes.
Constructor which instantiates the ReplSetTest object from existing nodes .