Class ReplicatedWriteRequest<R extends ReplicatedWriteRequest<R>>
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.support.replication.ReplicationRequest<R>
org.elasticsearch.action.support.replication.ReplicatedWriteRequest<R>
- All Implemented Interfaces:
IndicesRequest
,WriteRequest<R>
,Writeable
,org.elasticsearch.core.RefCounted
,TaskAwareRequest
- Direct Known Subclasses:
BulkShardRequest
,DeleteRequest
,IndexRequest
,ResyncReplicationRequest
,RetentionLeaseSyncAction.Request
public abstract class ReplicatedWriteRequest<R extends ReplicatedWriteRequest<R>>
extends ReplicationRequest<R>
implements WriteRequest<R>
Requests that are both ReplicationRequests (run on a shard's primary first, then the replica) and WriteRequest
(modify documents on a shard), for example
BulkShardRequest
, IndexRequest
, and DeleteRequest
.-
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 inherited from class org.elasticsearch.action.support.replication.ReplicationRequest
DEFAULT_TIMEOUT, index, shardId, timeout, waitForActiveShards
-
Constructor Summary
ConstructorDescriptionConstructor for deserialization.ReplicatedWriteRequest(ShardId shardId)
ReplicatedWriteRequest(ShardId shardId, StreamInput in)
Constructor for thin deserialization. -
Method Summary
Modifier and TypeMethodDescriptionShould this request trigger a refresh (WriteRequest.RefreshPolicy.IMMEDIATE), wait for a refresh ( WriteRequest.RefreshPolicy.WAIT_UNTIL), or proceed ignore refreshes entirely (WriteRequest.RefreshPolicy.NONE, the default).setRefreshPolicy(WriteRequest.RefreshPolicy refreshPolicy)
Should this request trigger a refresh (WriteRequest.RefreshPolicy.IMMEDIATE), wait for a refresh ( WriteRequest.RefreshPolicy.WAIT_UNTIL), or proceed ignore refreshes entirely (WriteRequest.RefreshPolicy.NONE, the default).void
writeThin(StreamOutput out)
Thin serialization that does not writeReplicationRequest.shardId
and will only writeReplicationRequest.index
if it is different from the index name inReplicationRequest.shardId
.void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.replication.ReplicationRequest
createTask, getDescription, index, index, indices, indicesOptions, onRetry, routedBasedOnClusterVersion, shardId, timeout, timeout, timeout, toString, 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.elasticsearch.action.IndicesRequest
allowsRemoteIndices, includeDataStreams
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
setParentTask
Methods inherited from interface org.elasticsearch.action.support.WriteRequest
setRefreshPolicy, validate
-
Constructor Details
-
ReplicatedWriteRequest
Constructor for thin deserialization.- Throws:
IOException
-
ReplicatedWriteRequest
Constructor for deserialization.- Throws:
IOException
-
ReplicatedWriteRequest
-
-
Method Details
-
setRefreshPolicy
Description copied from interface:WriteRequest
Should this request trigger a refresh (WriteRequest.RefreshPolicy.IMMEDIATE), wait for a refresh ( WriteRequest.RefreshPolicy.WAIT_UNTIL), or proceed ignore refreshes entirely (WriteRequest.RefreshPolicy.NONE, the default).- Specified by:
setRefreshPolicy
in interfaceWriteRequest<R extends ReplicatedWriteRequest<R>>
-
getRefreshPolicy
Description copied from interface:WriteRequest
Should this request trigger a refresh (WriteRequest.RefreshPolicy.IMMEDIATE), wait for a refresh ( WriteRequest.RefreshPolicy.WAIT_UNTIL), or proceed ignore refreshes entirely (WriteRequest.RefreshPolicy.NONE, the default).- Specified by:
getRefreshPolicy
in interfaceWriteRequest<R extends ReplicatedWriteRequest<R>>
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classReplicationRequest<R extends ReplicatedWriteRequest<R>>
- Throws:
IOException
-
writeThin
Description copied from class:ReplicationRequest
Thin serialization that does not writeReplicationRequest.shardId
and will only writeReplicationRequest.index
if it is different from the index name inReplicationRequest.shardId
.- Overrides:
writeThin
in classReplicationRequest<R extends ReplicatedWriteRequest<R>>
- Throws:
IOException
-