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.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionConcreteShardRequest(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.longbooleanbooleanbooleanvoidsetParentTask(String parentTaskNode, long parentTaskId)Set a reference to task that caused this task to be run.voidsetParentTask(TaskId taskId)Set a reference to task that created this request.toString()voidwriteTo(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:TaskAwareRequestSet a reference to task that caused this task to be run.- Specified by:
setParentTaskin interfaceTaskAwareRequest
-
setParentTask
Description copied from class:TransportRequestSet a reference to task that created this request.- Specified by:
setParentTaskin interfaceTaskAwareRequest- Overrides:
setParentTaskin classTransportRequest
-
getParentTask
Description copied from class:TransportRequestGet a reference to the task that created this request. Defaults toTaskId.EMPTY_TASK_ID, meaning "there is no parent".- Specified by:
getParentTaskin interfaceTaskAwareRequest- Overrides:
getParentTaskin classTransportRequest
-
createTask
public Task createTask(long id, String type, String action, TaskId parentTaskId, Map<String,String> headers)Description copied from interface:TaskAwareRequestReturns the task object that should be used to keep track of the processing of the request.- Specified by:
createTaskin interfaceTaskAwareRequest
-
getDescription
Description copied from interface:TaskAwareRequestReturns optional description of the request to be displayed by the task manager- Specified by:
getDescriptionin interfaceTaskAwareRequest
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classTransportRequest- Throws:
IOException
-
sentFromLocalReroute
public boolean sentFromLocalReroute() -
localRerouteInitiatedByNodeClient
public boolean localRerouteInitiatedByNodeClient() -
getRequest
-
getTargetAllocationID
-
getPrimaryTerm
public long getPrimaryTerm() -
isRawIndexingData
public boolean isRawIndexingData()- Specified by:
isRawIndexingDatain interfaceRawIndexingDataTransportRequest
-
toString
- Overrides:
toStringin classTransportRequest
-