replaceConnection(oldObject, newObject) {
    const idx = this.redisConnections.findIndex(function(element) {
      return ConnectionWrapper.isSameConnection(element.options, oldObject);
    });
    if (idx >= 0) this.redisConnections.splice(idx, 1, newObject);
  }
Replace one object from connection list with another object.
 The list is search and the first object found matching oldObject is removed and
 replace with newObject. For comparison of the connection objects the _isSameConnection method is used.

 This method changes the list as parameter.

 @param {object} oldObject connection object to search in list to remove
 @param {object} newObject new connection object to add to list instead of old one.