parent
ecdcc2df92
commit
adfa82b2ed
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.elasticsearch.action.get;
|
||||
|
||||
import com.google.common.collect.Iterators;
|
||||
import org.elasticsearch.ElasticsearchIllegalArgumentException;
|
||||
import org.elasticsearch.ElasticsearchParseException;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
|
@ -39,9 +40,10 @@ import org.elasticsearch.search.fetch.source.FetchSourceContext;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class MultiGetRequest extends ActionRequest<MultiGetRequest> {
|
||||
public class MultiGetRequest extends ActionRequest<MultiGetRequest> implements Iterable<MultiGetRequest.Item> {
|
||||
|
||||
/**
|
||||
* A single get item.
|
||||
|
@ -404,6 +406,11 @@ public class MultiGetRequest extends ActionRequest<MultiGetRequest> {
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<Item> iterator() {
|
||||
return Iterators.unmodifiableIterator(items.iterator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) throws IOException {
|
||||
super.readFrom(in);
|
||||
|
|
Loading…
Reference in New Issue