Package org.elasticsearch.action.bulk
Class BulkShardRequest
java.lang.Object
- All Implemented Interfaces:
org.apache.lucene.util.Accountable
,IndicesRequest
,WriteRequest<BulkShardRequest>
,Writeable
,org.elasticsearch.common.util.concurrent.RefCounted
,TaskAwareRequest
public class BulkShardRequest extends ReplicatedWriteRequest<BulkShardRequest> implements org.apache.lucene.util.Accountable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.Replaceable
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
Nested classes/interfaces inherited from interface org.elasticsearch.action.support.WriteRequest
WriteRequest.RefreshPolicy
-
Field Summary
Fields Modifier and Type Field Description static Version
COMPACT_SHARD_ID_VERSION
Fields inherited from class org.elasticsearch.action.support.replication.ReplicationRequest
DEFAULT_TIMEOUT, index, shardId, timeout, waitForActiveShards
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Constructor Summary
Constructors Constructor Description BulkShardRequest(StreamInput in)
BulkShardRequest(ShardId shardId, WriteRequest.RefreshPolicy refreshPolicy, BulkItemRequest[] items)
-
Method Summary
Modifier and Type Method Description java.lang.String
getDescription()
Returns optional description of the request to be displayed by the task managerjava.lang.String[]
indices()
Returns the array of indices that the action relates toBulkItemRequest[]
items()
void
onRetry()
This method is called before this replication request is retried the first time.long
ramBytesUsed()
protected BulkShardRequest
routedBasedOnClusterVersion(long routedBasedOnClusterVersion)
Sets the minimum version of the cluster state that is required on the next node before we redirect to another primary.java.lang.String
toString()
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.replication.ReplicatedWriteRequest
getRefreshPolicy, setRefreshPolicy, writeThin
Methods inherited from class org.elasticsearch.action.support.replication.ReplicationRequest
createTask, index, index, indicesOptions, shardId, timeout, timeout, timeout, validate, waitForActiveShards, waitForActiveShards, waitForActiveShards
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRef
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
Methods inherited from interface org.elasticsearch.action.IndicesRequest
includeDataStreams
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
setParentTask
Methods inherited from interface org.elasticsearch.action.support.WriteRequest
setRefreshPolicy, validate
-
Field Details
-
COMPACT_SHARD_ID_VERSION
-
-
Constructor Details
-
BulkShardRequest
- Throws:
java.io.IOException
-
BulkShardRequest
public BulkShardRequest(ShardId shardId, WriteRequest.RefreshPolicy refreshPolicy, BulkItemRequest[] items)
-
-
Method Details
-
items
-
indices
public java.lang.String[] indices()Description copied from interface:IndicesRequest
Returns the array of indices that the action relates to- Specified by:
indices
in interfaceIndicesRequest
- Overrides:
indices
in classReplicationRequest<BulkShardRequest>
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classReplicatedWriteRequest<BulkShardRequest>
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Specified by:
toString
in classReplicationRequest<BulkShardRequest>
-
getDescription
public java.lang.String getDescription()Description copied from interface:TaskAwareRequest
Returns optional description of the request to be displayed by the task manager- Specified by:
getDescription
in interfaceTaskAwareRequest
- Overrides:
getDescription
in classReplicationRequest<BulkShardRequest>
-
routedBasedOnClusterVersion
Description copied from class:ReplicationRequest
Sets the minimum version of the cluster state that is required on the next node before we redirect to another primary. Used to prevent redirect loops, see alsoAbstractRunnable.doRun()
- Overrides:
routedBasedOnClusterVersion
in classReplicationRequest<BulkShardRequest>
-
onRetry
public void onRetry()Description copied from class:ReplicationRequest
This method is called before this replication request is retried the first time.- Overrides:
onRetry
in classReplicationRequest<BulkShardRequest>
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsed
in interfaceorg.apache.lucene.util.Accountable
-