public abstract class SingleShardRequest<T extends SingleShardRequest> extends ActionRequest<T> implements IndicesRequest
TransportRequest.EmptyIndicesRequest.Replaceable| Modifier and Type | Field and Description |
|---|---|
protected String |
index
The concrete index name
Whether index property is optional depends on the concrete implementation.
|
static IndicesOptions |
INDICES_OPTIONS |
headers| Modifier | Constructor and Description |
|---|---|
|
SingleShardRequest() |
protected |
SingleShardRequest(ActionRequest request) |
protected |
SingleShardRequest(ActionRequest request,
String index) |
protected |
SingleShardRequest(String index) |
| Modifier and Type | Method and Description |
|---|---|
String |
index() |
T |
index(String index)
Sets the index.
|
String[] |
indices()
Returns the array of indices that the action relates to
|
IndicesOptions |
indicesOptions()
Returns the indices options used to resolve indices.
|
boolean |
operationThreaded()
Controls if the operation will be executed on a separate thread when executed locally.
|
T |
operationThreaded(boolean threadedOperation)
Controls if the operation will be executed on a separate thread when executed locally.
|
void |
readFrom(StreamInput in) |
protected ActionRequestValidationException |
validateNonNullIndex() |
void |
writeTo(StreamOutput out) |
validatecreateTask, getDescriptionremoteAddress, remoteAddresscontextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContextpublic static final IndicesOptions INDICES_OPTIONS
@Nullable protected String index
validateNonNullIndex() to check if the index property has been setpublic SingleShardRequest()
protected SingleShardRequest(String index)
protected SingleShardRequest(ActionRequest request)
protected SingleShardRequest(ActionRequest request, String index)
protected ActionRequestValidationException validateNonNullIndex()
@Nullable public String index()
null if index is optional.
Whether index property is optional depends on the concrete implementation. If index property
is required the concrete implementation should use validateNonNullIndex() to check
if the index property has been setpublic String[] indices()
IndicesRequestindices in interface IndicesRequestpublic IndicesOptions indicesOptions()
IndicesRequestindicesOptions in interface IndicesRequestpublic boolean operationThreaded()
public final T operationThreaded(boolean threadedOperation)
public void readFrom(StreamInput in) throws IOException
readFrom in interface StreamablereadFrom in class ActionRequest<T extends SingleShardRequest>IOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamablewriteTo in class ActionRequest<T extends SingleShardRequest>IOExceptionCopyright © 2009–2017. All rights reserved.