Class TransportReplicationAction.ConcreteShardRequest<R extends TransportRequest>
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, targetAllocationID, long primaryTerm)
ConcreteShardRequest(R request, targetAllocationID, long primaryTerm, boolean sentFromLocalReroute, boolean localRerouteInitiatedByNodeClient)
-
Method Summary
Modifier and TypeMethodDescriptioncreateTask(long id, type, action, TaskId parentTaskId, <,> headers)
Returns 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
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
Methods inherited from class java.lang.
, , , , , , , , ,
-
Constructor Details
-
ConcreteShardRequest
- Throws:
-
ConcreteShardRequest
-
ConcreteShardRequest
public ConcreteShardRequest(R request, targetAllocationID, long primaryTerm, boolean sentFromLocalReroute, boolean localRerouteInitiatedByNodeClient)
-
-
Method Details
-
setParentTask
public void setParentTask( parentTaskNode, long parentTaskId)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
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
public 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:
-
sentFromLocalReroute
public boolean sentFromLocalReroute() -
localRerouteInitiatedByNodeClient
public boolean localRerouteInitiatedByNodeClient() -
getRequest
-
getTargetAllocationID
public getTargetAllocationID() -
getPrimaryTerm
public long getPrimaryTerm() -
isRawIndexingData
public boolean isRawIndexingData()- Specified by:
isRawIndexingData
in interfaceRawIndexingDataTransportRequest
-
toString
public toString()- Overrides:
toString
in classTransportRequest
-