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,TaskAwareRequest
- 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
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
Constructors Constructor Description ConcreteShardRequest(Writeable.Reader<R> requestReader, StreamInput in)ConcreteShardRequest(R request, String targetAllocationID, long primaryTerm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaskcreateTask(long id, String type, String action, TaskId parentTaskId, Map<String,String> headers)Returns the task object that should be used to keep track of the processing of the request.StringgetDescription()Returns optional description of the request to be displayed by the task managerTaskIdgetParentTask()Get a reference to the task that created this request.longgetPrimaryTerm()RgetRequest()StringgetTargetAllocationID()voidsetParentTask(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.StringtoString()voidwriteTo(StreamOutput out)Write this into the StreamOutput.-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
-
-
-
Constructor Detail
-
ConcreteShardRequest
public ConcreteShardRequest(Writeable.Reader<R> requestReader, StreamInput in) throws IOException
- Throws:
IOException
-
-
Method Detail
-
setParentTask
public void setParentTask(String parentTaskNode, long parentTaskId)
Description copied from interface:TaskAwareRequestSet a reference to task that caused this task to be run.
-
setParentTask
public void setParentTask(TaskId taskId)
Description copied from class:TransportRequestSet a reference to task that created this request.- Specified by:
setParentTaskin interfaceTaskAwareRequest- Overrides:
setParentTaskin classTransportRequest
-
getParentTask
public TaskId 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.
-
getDescription
public String getDescription()
Description copied from interface:TaskAwareRequestReturns optional description of the request to be displayed by the task manager
-
writeTo
public void writeTo(StreamOutput out) throws IOException
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classTransportRequest- Throws:
IOException
-
getRequest
public R getRequest()
-
getTargetAllocationID
public String getTargetAllocationID()
-
getPrimaryTerm
public long getPrimaryTerm()
-
-