public abstract class ShardReplicationOperationRequest<T extends ShardReplicationOperationRequest> extends ActionRequest<T> implements IndicesRequest
TransportRequest.Empty
IndicesRequest.Replaceable
Modifier and Type | Field and Description |
---|---|
static TimeValue |
DEFAULT_TIMEOUT |
protected String |
index |
protected TimeValue |
timeout |
Modifier | Constructor and Description |
---|---|
protected |
ShardReplicationOperationRequest() |
protected |
ShardReplicationOperationRequest(ActionRequest request)
Creates a new request that inherits headers and context from the request provided as argument.
|
protected |
ShardReplicationOperationRequest(T request)
Copy constructor that creates a new request that is a copy of the one provided as an argument.
|
protected |
ShardReplicationOperationRequest(T request,
ActionRequest originalRequest)
Copy constructor that creates a new request that is a copy of the one provided as an argument.
|
Modifier and Type | Method and Description |
---|---|
void |
beforeLocalFork()
Called before the request gets forked into a local thread.
|
boolean |
canHaveDuplicates()
Is this request can potentially be dup on a single shard.
|
WriteConsistencyLevel |
consistencyLevel() |
T |
consistencyLevel(WriteConsistencyLevel consistencyLevel)
Sets the consistency level of write.
|
String |
index() |
T |
index(String 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) |
ReplicationType |
replicationType()
The replication type.
|
T |
replicationType(ReplicationType replicationType)
Sets the replication type.
|
T |
replicationType(String replicationType)
Sets the replication type.
|
TimeValue |
timeout() |
T |
timeout(String timeout)
A timeout to wait if the index operation can't be performed immediately.
|
T |
timeout(TimeValue timeout)
A timeout to wait if the index operation can't be performed immediately.
|
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out) |
listenerThreaded, listenerThreaded
getHeader, getHeaders, hasHeader, putHeader, remoteAddress, remoteAddress
contextSize, copyContextFrom, getContext, getFromContext, getFromContext, hasInContext, isContextEmpty, putAllInContext, putInContext
public static final TimeValue DEFAULT_TIMEOUT
protected TimeValue timeout
protected String index
protected ShardReplicationOperationRequest()
protected ShardReplicationOperationRequest(ActionRequest request)
protected ShardReplicationOperationRequest(T request)
protected ShardReplicationOperationRequest(T request, ActionRequest originalRequest)
public boolean canHaveDuplicates()
public final boolean operationThreaded()
public final T operationThreaded(boolean threadedOperation)
public final T timeout(TimeValue timeout)
public final T timeout(String timeout)
public TimeValue timeout()
public String index()
public String[] indices()
IndicesRequest
indices
in interface IndicesRequest
public IndicesOptions indicesOptions()
IndicesRequest
indicesOptions
in interface IndicesRequest
public ReplicationType replicationType()
public final T replicationType(ReplicationType replicationType)
public WriteConsistencyLevel consistencyLevel()
public final T consistencyLevel(WriteConsistencyLevel consistencyLevel)
WriteConsistencyLevel.DEFAULT
public ActionRequestValidationException validate()
validate
in class ActionRequest<T extends ShardReplicationOperationRequest>
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class ActionRequest<T extends ShardReplicationOperationRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class ActionRequest<T extends ShardReplicationOperationRequest>
IOException
public void beforeLocalFork()
Copyright © 2009–2015. All rights reserved.