public class ReplicationOperation<Request extends ReplicationRequest<Request>,ReplicaRequest extends ReplicationRequest<ReplicaRequest>,PrimaryResultT extends ReplicationOperation.PrimaryResult<ReplicaRequest>>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ReplicationOperation.Primary<Request extends ReplicationRequest<Request>,ReplicaRequest extends ReplicationRequest<ReplicaRequest>,PrimaryResultT extends ReplicationOperation.PrimaryResult<ReplicaRequest>> |
static interface |
ReplicationOperation.PrimaryResult<R extends ReplicationRequest<R>> |
static interface |
ReplicationOperation.Replicas<ReplicaRequest extends ReplicationRequest<ReplicaRequest>> |
static class |
ReplicationOperation.RetryOnPrimaryException |
Modifier and Type | Field and Description |
---|---|
protected ActionListener<PrimaryResultT> |
resultListener |
Constructor and Description |
---|
ReplicationOperation(Request request,
ReplicationOperation.Primary<Request,ReplicaRequest,PrimaryResultT> primary,
ActionListener<PrimaryResultT> listener,
boolean executeOnReplicas,
boolean checkWriteConsistency,
ReplicationOperation.Replicas<ReplicaRequest> replicas,
java.util.function.Supplier<ClusterState> clusterStateSupplier,
ESLogger logger,
java.lang.String opType) |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
protected java.util.List<ShardRouting> |
getShards(ShardId shardId,
ClusterState state) |
static boolean |
ignoreReplicaException(java.lang.Throwable e)
Should an exception be ignored when the operation is performed on the replica.
|
static boolean |
isConflictException(java.lang.Throwable e) |
protected final ActionListener<PrimaryResultT extends ReplicationOperation.PrimaryResult<ReplicaRequest>> resultListener
public ReplicationOperation(Request request, ReplicationOperation.Primary<Request,ReplicaRequest,PrimaryResultT> primary, ActionListener<PrimaryResultT> listener, boolean executeOnReplicas, boolean checkWriteConsistency, ReplicationOperation.Replicas<ReplicaRequest> replicas, java.util.function.Supplier<ClusterState> clusterStateSupplier, ESLogger logger, java.lang.String opType)
public void execute() throws java.lang.Exception
java.lang.Exception
protected java.util.List<ShardRouting> getShards(ShardId shardId, ClusterState state)
public static boolean ignoreReplicaException(java.lang.Throwable e)
public static boolean isConflictException(java.lang.Throwable e)