Class TransportReplicationAction.ConcreteShardRequest<R extends TransportRequest>
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.support.replication.TransportReplicationAction.ConcreteShardRequest<R>
- All Implemented Interfaces:
Writeable
,org.elasticsearch.core.RefCounted
,TaskAwareRequest
,RawIndexingDataTransportRequest
- Direct Known Subclasses:
TransportReplicationAction.ConcreteReplicaRequest
- Enclosing class:
- TransportReplicationAction<Request extends ReplicationRequest<Request>,ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse>
public static class TransportReplicationAction.ConcreteShardRequest<R extends TransportRequest>
extends TransportRequest
implements RawIndexingDataTransportRequest
a wrapper class to encapsulate a request when being sent to a specific allocation id
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Constructor Summary
ConstructorDescriptionConcreteShardRequest(Writeable.Reader<R> requestReader, StreamInput in)
ConcreteShardRequest(R request, String targetAllocationID, long primaryTerm)
ConcreteShardRequest(R request, String targetAllocationID, long primaryTerm, boolean sentFromLocalReroute, boolean localRerouteInitiatedByNodeClient)
-
Method Summary
Modifier and TypeMethodDescriptionReturns the task object that should be used to keep track of the processing of the request.Returns optional description of the request to be displayed by the task managerGet a reference to the task that created this request.long
boolean
boolean
boolean
void
setParentTask(String parentTaskNode, long parentTaskId)
Set a reference to task that caused this task to be run.void
setParentTask(TaskId taskId)
Set a reference to task that created this request.toString()
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRef
-
Constructor Details
-
ConcreteShardRequest
- Throws:
IOException
-
ConcreteShardRequest
-
ConcreteShardRequest
-
-
Method Details
-
setParentTask
Description copied from interface:TaskAwareRequest
Set a reference to task that caused this task to be run.- Specified by:
setParentTask
in interfaceTaskAwareRequest
-
setParentTask
Description copied from class:TransportRequest
Set a reference to task that created this request.- Specified by:
setParentTask
in interfaceTaskAwareRequest
- Overrides:
setParentTask
in classTransportRequest
-
getParentTask
Description copied from class:TransportRequest
Get a reference to the task that created this request. Defaults toTaskId.EMPTY_TASK_ID
, meaning "there is no parent".- Specified by:
getParentTask
in interfaceTaskAwareRequest
- Overrides:
getParentTask
in classTransportRequest
-
createTask
public Task createTask(long id, String type, String action, TaskId parentTaskId, Map<String,String> headers)Description copied from interface:TaskAwareRequest
Returns the task object that should be used to keep track of the processing of the request.- Specified by:
createTask
in interfaceTaskAwareRequest
-
getDescription
Description copied from interface:TaskAwareRequest
Returns optional description of the request to be displayed by the task manager- Specified by:
getDescription
in interfaceTaskAwareRequest
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classTransportRequest
- Throws:
IOException
-
sentFromLocalReroute
public boolean sentFromLocalReroute() -
localRerouteInitiatedByNodeClient
public boolean localRerouteInitiatedByNodeClient() -
getRequest
-
getTargetAllocationID
-
getPrimaryTerm
public long getPrimaryTerm() -
isRawIndexingData
public boolean isRawIndexingData()- Specified by:
isRawIndexingData
in interfaceRawIndexingDataTransportRequest
-
toString
- Overrides:
toString
in classTransportRequest
-