Class TransportReplicationAction.ReplicasProxy

All Implemented Interfaces:
Enclosing class:
TransportReplicationAction<Request extends ReplicationRequest<Request>,​ReplicaRequest extends ReplicationRequest<ReplicaRequest>,​Response extends ReplicationResponse>

protected class TransportReplicationAction.ReplicasProxy
extends java.lang.Object
implements ReplicationOperation.Replicas<ReplicaRequest>
The ReplicasProxy is an implementation of the Replicas interface that performs the actual ReplicaRequest on the replica shards. It also encapsulates the logic required for failing the replica if deemed necessary as well as marking it as stale when needed.
  • Constructor Summary

    Modifier Constructor Description
    protected ReplicasProxy()  
  • Method Summary

    Modifier and Type Method Description
    void failShardIfNeeded​(ShardRouting replica, long primaryTerm, java.lang.String message, java.lang.Exception exception, ActionListener<java.lang.Void> listener)
    Fail the specified shard if needed, removing it from the current set of active shards.
    void markShardCopyAsStaleIfNeeded​(ShardId shardId, java.lang.String allocationId, long primaryTerm, ActionListener<java.lang.Void> listener)
    Marks shard copy as stale if needed, removing its allocation id from the set of in-sync allocation ids.
    void performOn​(ShardRouting replica, ReplicaRequest request, long primaryTerm, long globalCheckpoint, long maxSeqNoOfUpdatesOrDeletes, ActionListener<ReplicationOperation.ReplicaResponse> listener)
    Performs the specified request on the specified replica.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait