protected static class TransportReplicationAction.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse> extends java.lang.Object implements ReplicationOperation.PrimaryResult<ReplicaRequest>
Modifier and Type | Field and Description |
---|---|
java.lang.Exception |
finalFailure |
Response |
finalResponseIfSuccessful |
Constructor and Description |
---|
PrimaryResult(ReplicaRequest replicaRequest,
Response replicationResponse) |
PrimaryResult(ReplicaRequest replicaRequest,
Response finalResponseIfSuccessful,
java.lang.Exception finalFailure)
Result of executing a primary operation
expects
finalResponseIfSuccessful or finalFailure to be not-null |
Modifier and Type | Method and Description |
---|---|
ReplicaRequest |
replicaRequest() |
void |
respond(ActionListener<Response> listener) |
void |
setShardInfo(ReplicationResponse.ShardInfo shardInfo) |
public final Response extends ReplicationResponse finalResponseIfSuccessful
public final java.lang.Exception finalFailure
public PrimaryResult(ReplicaRequest replicaRequest, Response finalResponseIfSuccessful, java.lang.Exception finalFailure)
finalResponseIfSuccessful
or finalFailure
to be not-nullpublic PrimaryResult(ReplicaRequest replicaRequest, Response replicationResponse)
public ReplicaRequest replicaRequest()
replicaRequest
in interface ReplicationOperation.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>>
public void setShardInfo(ReplicationResponse.ShardInfo shardInfo)
setShardInfo
in interface ReplicationOperation.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>>
public void respond(ActionListener<Response> listener)