Class TransportWriteAction.WriteReplicaResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>>
- java.lang.Object
-
- org.elasticsearch.action.support.replication.TransportReplicationAction.ReplicaResult
-
- org.elasticsearch.action.support.replication.TransportWriteAction.WriteReplicaResult<ReplicaRequest>
-
- Enclosing class:
- TransportWriteAction<Request extends ReplicatedWriteRequest<Request>,ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>,Response extends ReplicationResponse & WriteResponse>
public static class TransportWriteAction.WriteReplicaResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>> extends TransportReplicationAction.ReplicaResult
Result of taking the action on the replica.
-
-
Field Summary
Fields Modifier and Type Field Description Translog.Location
location
-
Constructor Summary
Constructors Constructor Description WriteReplicaResult(ReplicaRequest request, Translog.Location location, java.lang.Exception operationFailure, IndexShard replica, org.apache.logging.log4j.Logger logger)
-
Method Summary
Modifier and Type Method Description void
onFailure(java.lang.Exception ex)
void
onSuccess(boolean forcedRefresh)
void
respond(ActionListener<TransportResponse.Empty> listener)
protected void
respondIfPossible(java.lang.Exception ex)
Respond if the refresh has occurred and the listener is ready.
-
-
-
Field Detail
-
location
public final Translog.Location location
-
-
Constructor Detail
-
WriteReplicaResult
public WriteReplicaResult(ReplicaRequest request, @Nullable Translog.Location location, @Nullable java.lang.Exception operationFailure, IndexShard replica, org.apache.logging.log4j.Logger logger)
-
-
Method Detail
-
respond
public void respond(ActionListener<TransportResponse.Empty> listener)
- Overrides:
respond
in classTransportReplicationAction.ReplicaResult
-
respondIfPossible
protected void respondIfPossible(java.lang.Exception ex)
Respond if the refresh has occurred and the listener is ready. Always called while synchronized onthis
.
-
onFailure
public void onFailure(java.lang.Exception ex)
-
onSuccess
public void onSuccess(boolean forcedRefresh)
-
-