Package org.elasticsearch.action.bulk
Class BulkShardRequest
java.lang.Object
- All Implemented Interfaces:
org.apache.lucene.util.Accountable,IndicesRequest,WriteRequest<BulkShardRequest>,Writeable,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.EmptyNested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.ReplaceableNested 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 VersionCOMPACT_SHARD_ID_VERSIONFields inherited from class org.elasticsearch.action.support.replication.ReplicationRequest
DEFAULT_TIMEOUT, index, shardId, timeout, waitForActiveShards -
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.StringgetDescription()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()voidonRetry()This method is called before this replication request is retried the first time.longramBytesUsed()protected BulkShardRequestroutedBasedOnClusterVersion(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.StringtoString()voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.replication.ReplicatedWriteRequest
getRefreshPolicy, setRefreshPolicy, writeThinMethods inherited from class org.elasticsearch.action.support.replication.ReplicationRequest
createTask, index, index, indicesOptions, shardId, timeout, timeout, timeout, validate, waitForActiveShards, waitForActiveShards, waitForActiveShardsMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.action.support.WriteRequest
setRefreshPolicy, validate
-
Field Details
-
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:IndicesRequestReturns the array of indices that the action relates to- Specified by:
indicesin interfaceIndicesRequest- Overrides:
indicesin classReplicationRequest<BulkShardRequest>
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classReplicatedWriteRequest<BulkShardRequest>- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Specified by:
toStringin classReplicationRequest<BulkShardRequest>
-
getDescription
public java.lang.String getDescription()Description copied from interface:TaskAwareRequestReturns optional description of the request to be displayed by the task manager- Specified by:
getDescriptionin interfaceTaskAwareRequest- Overrides:
getDescriptionin classReplicationRequest<BulkShardRequest>
-
routedBasedOnClusterVersion
Description copied from class:ReplicationRequestSets 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:
routedBasedOnClusterVersionin classReplicationRequest<BulkShardRequest>
-
onRetry
public void onRetry()Description copied from class:ReplicationRequestThis method is called before this replication request is retried the first time.- Overrides:
onRetryin classReplicationRequest<BulkShardRequest>
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsedin interfaceorg.apache.lucene.util.Accountable
-