public abstract class SingleShardRequest<T extends SingleShardRequest> extends ActionRequest<T> implements IndicesRequest
TransportRequest.Empty
IndicesRequest.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) |
validate
createTask, getDescription
remoteAddress, remoteAddress
contextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContext
public 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()
IndicesRequest
indices
in interface IndicesRequest
public IndicesOptions indicesOptions()
IndicesRequest
indicesOptions
in interface IndicesRequest
public boolean operationThreaded()
public final T operationThreaded(boolean threadedOperation)
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class ActionRequest<T extends SingleShardRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class ActionRequest<T extends SingleShardRequest>
IOException
Copyright © 2009–2017. All rights reserved.