Class TransportReplicationAction.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse>
java.lang.Object
org.elasticsearch.action.support.replication.TransportReplicationAction.PrimaryResult<ReplicaRequest,Response>
- All Implemented Interfaces:
ReplicationOperation.PrimaryResult<ReplicaRequest>
- Direct Known Subclasses:
TransportWriteAction.WritePrimaryResult
- Enclosing class:
- TransportReplicationAction<Request extends ReplicationRequest<Request>,ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse>
public static class TransportReplicationAction.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>,Response extends ReplicationResponse>
extends Object
implements ReplicationOperation.PrimaryResult<ReplicaRequest>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPrimaryResult(ReplicaRequest replicaRequest, Response replicationResponse)
PrimaryResult(ReplicaRequest replicaRequest, Response finalResponseIfSuccessful, Exception finalFailure)
Result of executing a primary operation expectsfinalResponseIfSuccessful
orfinalFailure
to be not-null -
Method Summary
Modifier and TypeMethodDescriptionvoid
runPostReplicationActions(ActionListener<Void> listener)
Run actions to be triggered post replicationvoid
setShardInfo(ReplicationResponse.ShardInfo shardInfo)
-
Field Details
-
replicaRequest
-
finalResponseIfSuccessful
-
finalFailure
-
-
Constructor Details
-
PrimaryResult
public PrimaryResult(ReplicaRequest replicaRequest, Response finalResponseIfSuccessful, Exception finalFailure)Result of executing a primary operation expectsfinalResponseIfSuccessful
orfinalFailure
to be not-null -
PrimaryResult
-
-
Method Details
-
replicaRequest
- Specified by:
replicaRequest
in interfaceReplicationOperation.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>>
- Returns:
- null if no operation needs to be sent to a replica (for example when the operation failed on the primary due to a parsing exception)
-
setShardInfo
- Specified by:
setShardInfo
in interfaceReplicationOperation.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>>
-
runPostReplicationActions
Description copied from interface:ReplicationOperation.PrimaryResult
Run actions to be triggered post replication- Specified by:
runPostReplicationActions
in interfaceReplicationOperation.PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>>
- Parameters:
listener
- calllback that is invoked after post replication actions have completed
-