org.elasticsearch.action.get
Class MultiGetRequest

java.lang.Object
  extended by org.elasticsearch.action.get.MultiGetRequest
All Implemented Interfaces:
ActionRequest, Streamable

public class MultiGetRequest
extends java.lang.Object
implements ActionRequest


Nested Class Summary
static class MultiGetRequest.Item
          A single get item.
 
Constructor Summary
MultiGetRequest()
           
 
Method Summary
 MultiGetRequest add(MultiGetRequest.Item item)
           
 MultiGetRequest add(java.lang.String index, java.lang.String type, java.lang.String id)
           
 void add(java.lang.String defaultIndex, java.lang.String defaultType, java.lang.String[] defaultFields, byte[] data, int from, int length)
           
 boolean listenerThreaded()
          Should the response listener be executed on a thread or not.
 MultiGetRequest listenerThreaded(boolean listenerThreaded)
          Sets if the response listener be executed on a thread or not.
 java.lang.String preference()
           
 MultiGetRequest preference(java.lang.String preference)
          Sets the preference to execute the search.
 void readFrom(StreamInput in)
           
 boolean realtime()
           
 MultiGetRequest realtime(java.lang.Boolean realtime)
           
 boolean refresh()
           
 MultiGetRequest refresh(boolean refresh)
           
 ActionRequestValidationException validate()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiGetRequest

public MultiGetRequest()
Method Detail

add

public MultiGetRequest add(MultiGetRequest.Item item)

add

public MultiGetRequest add(java.lang.String index,
                           @Nullable
                           java.lang.String type,
                           java.lang.String id)

listenerThreaded

public boolean listenerThreaded()
Description copied from interface: ActionRequest
Should the response listener be executed on a thread or not.

When not executing on a thread, it will either be executed on the calling thread, or on an expensive, IO based, thread.

Specified by:
listenerThreaded in interface ActionRequest

listenerThreaded

public MultiGetRequest listenerThreaded(boolean listenerThreaded)
Description copied from interface: ActionRequest
Sets if the response listener be executed on a thread or not.

Specified by:
listenerThreaded in interface ActionRequest

validate

public ActionRequestValidationException validate()
Specified by:
validate in interface ActionRequest

preference

public MultiGetRequest preference(java.lang.String preference)
Sets the preference to execute the search. Defaults to randomize across shards. Can be set to _local to prefer local shards, _primary to execute only on primary shards, or a custom value, which guarantees that the same order will be used across different requests.


preference

public java.lang.String preference()

realtime

public boolean realtime()

realtime

public MultiGetRequest realtime(java.lang.Boolean realtime)

refresh

public boolean refresh()

refresh

public MultiGetRequest refresh(boolean refresh)

add

public void add(@Nullable
                java.lang.String defaultIndex,
                @Nullable
                java.lang.String defaultType,
                @Nullable
                java.lang.String[] defaultFields,
                byte[] data,
                int from,
                int length)
         throws java.lang.Exception
Throws:
java.lang.Exception

readFrom

public void readFrom(StreamInput in)
              throws java.io.IOException
Specified by:
readFrom in interface Streamable
Throws:
java.io.IOException

writeTo

public void writeTo(StreamOutput out)
             throws java.io.IOException
Specified by:
writeTo in interface Streamable
Throws:
java.io.IOException