Add several objects in this index and wait end of indexing

 @param objects the array of objects to add inside the index.
  Each object is represented by an associative array
 @param request_options contains extra parameters to send with your query
420059
def add_objects!(objects, request_options = {})
      res = add_objects(objects, request_options)
      wait_task(res['taskID'], WAIT_TASK_DEFAULT_TIME_BEFORE_RETRY, request_options)
      res
    end
43404
function RequestApi(constructorOptions) {

    LOG.debug('Instantiating new Request object');
    LOG.debug('Validating options');

    try {

        this.options =
            new requestOptions.Constructor().validate(constructorOptions);

    } catch (err) {

        LOG.error('Received error: %s', err);

        throw(
            err
        );

    }

    this.requests = [];
    this.batchId = 1;

}
1314261
public void add(final DataPoints datapoints,
                  final String options) {
    // Technically, we could check the number of data points in the
    // datapoints argument in order to do something when there are none, but
    // this is potentially expensive with a SpanGroup since it requires
    // iterating through the entire SpanGroup.  We'll check this later
    // when we're trying to use the data, in order to avoid multiple passes
    // through the entire data.
    this.datapoints.add(datapoints);
    this.options.add(options);
  }
638541
private void addParams(RequestBuilder call, Param[] params) {
		
		// Once upon a time this was necessary, now it isn't
		//call.addParam("format", "json");
		
		if (this.accessToken != null)
			call.addParam("access_token", this.accessToken);

		if (this.appSecretProof != null)
			call.addParam("appsecret_proof", this.appSecretProof);

		if (params != null) {
			for (Param param: params) {
				if (param instanceof BinaryParam) {
					call.addParam(param.name, (InputStream)param.value, ((BinaryParam)param).contentType, "irrelevant");
				} else {
					String paramValue = StringUtils.stringifyValue(param, this.mapper);
					call.addParam(param.name, paramValue);
				}
			}
		}
	}
1129818
@SafeVarargs
    public final void addAll(T... items) {
        final int length = items.length;
        if (length == 0) {
            return;
        }
        synchronized (mLock) {
            final int position = getItemCount();
            Collections.addAll(mObjects, items);
            notifyItemRangeInserted(position, length);
        }
    }
645269
function addOptions(queryOptions, options) {
	const {transaction, logging} = options;
	if (transaction !== undefined) queryOptions.transaction = transaction;
	if (logging !== undefined) queryOptions.logging = logging;
	return queryOptions;
}
1277026
private void appendRequestParams(FastStringWriter actualUriBuf, Map<Object, Object> params, String encoding) {

        boolean querySeparator = false;

        for (Map.Entry<Object, Object> entry : params.entrySet()) {
            Object name = entry.getKey();
            if (name.equals(GrailsControllerClass.CONTROLLER) || name.equals(GrailsControllerClass.ACTION) || name.equals(ARGUMENT_ID)) {
                continue;
            }

            if (!querySeparator) {
                actualUriBuf.append('?');
                querySeparator = true;
            }
            else {
                actualUriBuf.append(ENTITY_AMPERSAND);
            }
            Object value = entry.getValue();
            if (value instanceof Collection) {
                Collection values = (Collection) value;
                Iterator valueIterator = values.iterator();
                while (valueIterator.hasNext()) {
                    Object currentValue = valueIterator.next();
                    appendRequestParam(actualUriBuf, name, currentValue, encoding);
                    if (valueIterator.hasNext()) {
                        actualUriBuf.append(ENTITY_AMPERSAND);
                    }
                }
            }
            else if (value != null && value.getClass().isArray()) {
                Object[] array = (Object[]) value;
                for (int j = 0; j < array.length; j++) {
                    Object currentValue = array[j];
                    appendRequestParam(actualUriBuf, name, currentValue, encoding);
                    if (j < (array.length-1)) {
                        actualUriBuf.append(ENTITY_AMPERSAND);
                    }
                }
            }
            else {
                appendRequestParam(actualUriBuf, name, value, encoding);
            }
        }
    }
1370204
public JSONObject search(Query params, RequestOptions requestOptions) throws AlgoliaException {
    String paramsString = params.getQueryString();
    JSONObject body = new JSONObject();
    try {
      body.put("params", paramsString);
    } catch (JSONException e) {
      throw new RuntimeException(e);
    }
    return client.postRequest("/1/indexes/" + encodedIndexName + "/query", body.toString(), false, true, requestOptions);
  }
237205
public void setObjects(Map<String, Object> objects) {
        for (Map.Entry<String, Object> entry: objects.entrySet()) {
            js.put(entry.getKey(), entry.getValue());
        }
    }
668440
public JSONObject multipleQueries(List<IndexQuery> queries, RequestOptions requestOptions) throws AlgoliaException {
    return multipleQueries(queries, "none", requestOptions);
  }
1056121
public synchronized void addChangeRequests(List<T> requests)
  {
    for (T request : requests) {
      changes.add(new Holder<>(request, getLastCounter().inc()));
    }

    singleThreadedExecutor.execute(resolveWaitingFuturesRunnable);
  }
152629
protected void setObjects(PreparedStatement ps, Object... objects)
            throws SQLException {
        int index = 1;
        for (Object obj : objects) {
            ps.setObject(index, obj);
            index++;
        }
    }
795787
public final void addObject(Object object) {
        if (object instanceof Iterable) {
            // Iterable
            for (Object o : (Iterable<?>) object) {
                objects.add(o);
            }
        } else if (object.getClass().isArray()) {
            // Array
            for (Object o : (Object[]) object) {
                objects.add(o);
            }
        } else {
            // Single object
            objects.add(object);
        }
    }
778501
@Scope(DocScope.IO)
    public UrlIO addRequestProperties(final Map<String, String> params) {
        requestProperties.putAll(params);
        return this;
    }
1089203
public Spider addRequest(Request... requests) {
        for (Request request : requests) {
            addRequest(request);
        }
        signalNewUrl();
        return this;
    }
90484
public JSONObject saveObjects(List<JSONObject> objects) throws AlgoliaException {
    return this.saveObjects(objects, RequestOptions.empty);
  }
606556
private void addQueryParams(final Request request) {
        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }