All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.algolia.search.models.indexing.MultipleIndexBatchIndexingResponse Maven / Gradle / Ivy

There is a newer version: 3.16.9
Show newest version
package com.algolia.search.models.indexing;

import com.algolia.search.models.WaitableResponse;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class MultipleIndexBatchIndexingResponse implements Serializable, WaitableResponse {

  public List getObjectIDs() {
    return objectIDs;
  }

  public MultipleIndexBatchIndexingResponse setObjectIDs(List objectIDs) {
    this.objectIDs = objectIDs;
    return this;
  }

  public Map getTaskID() {
    return taskID;
  }

  public MultipleIndexBatchIndexingResponse setTaskID(Map taskID) {
    this.taskID = taskID;
    return this;
  }

  public void setWaitConsumer(BiConsumer waitConsumer) {
    this.waitConsumer = waitConsumer;
  }

  private BiConsumer waitConsumer;
  private List objectIDs;
  private Map taskID;

  @Override
  public void waitTask() {
    for (Map.Entry entry : taskID.entrySet()) {
      waitConsumer.accept(entry.getKey(), entry.getValue());
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy