Class ReplicationOperation<Request extends ReplicationRequest<Request>,ReplicaRequest extends ReplicationRequest<ReplicaRequest>,PrimaryResultT extends ReplicationOperation.PrimaryResult<ReplicaRequest>>
java.lang.Object
org.elasticsearch.action.support.replication.ReplicationOperation<Request,ReplicaRequest,PrimaryResultT>
public class ReplicationOperation<Request extends ReplicationRequest<Request>,ReplicaRequest extends ReplicationRequest<ReplicaRequest>,PrimaryResultT extends ReplicationOperation.PrimaryResult<ReplicaRequest>>
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ReplicationOperation.Primary<RequestT extends ReplicationRequest<RequestT>,ReplicaRequestT extends ReplicationRequest<ReplicaRequestT>,PrimaryResultT extends ReplicationOperation.PrimaryResult<ReplicaRequestT>>
An encapsulation of an operation that is to be performed on the primary shardstatic interface
ReplicationOperation.PrimaryResult<RequestT extends ReplicationRequest<RequestT>>
static interface
ReplicationOperation.ReplicaResponse
An interface to encapsulate the metadata needed from replica shards when they respond to operations performed on them.static interface
ReplicationOperation.Replicas<RequestT extends ReplicationRequest<RequestT>>
An encapsulation of an operation that will be executed on the replica shards, if present.static class
ReplicationOperation.RetryOnPrimaryException
-
Constructor Summary
Constructors Constructor Description ReplicationOperation(Request request, ReplicationOperation.Primary<Request,ReplicaRequest,PrimaryResultT> primary, ActionListener<PrimaryResultT> listener, ReplicationOperation.Replicas<ReplicaRequest> replicas, org.apache.logging.log4j.Logger logger, ThreadPool threadPool, java.lang.String opType, long primaryTerm, org.elasticsearch.common.unit.TimeValue initialRetryBackoffBound, org.elasticsearch.common.unit.TimeValue retryTimeout)
-
Method Summary
Modifier and Type Method Description protected java.lang.String
checkActiveShardCount()
Checks whether we can perform a write based on the required active shard count setting.void
execute()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ReplicationOperation
public ReplicationOperation(Request request, ReplicationOperation.Primary<Request,ReplicaRequest,PrimaryResultT> primary, ActionListener<PrimaryResultT> listener, ReplicationOperation.Replicas<ReplicaRequest> replicas, org.apache.logging.log4j.Logger logger, ThreadPool threadPool, java.lang.String opType, long primaryTerm, org.elasticsearch.common.unit.TimeValue initialRetryBackoffBound, org.elasticsearch.common.unit.TimeValue retryTimeout)
-
-
Method Details
-
execute
public void execute() throws java.lang.Exception- Throws:
java.lang.Exception
-
checkActiveShardCount
protected java.lang.String checkActiveShardCount()Checks whether we can perform a write based on the required active shard count setting. Returns **null* if OK to proceed, or a string describing the reason to stop
-