public static interface ReplicationOperation.Replicas<ReplicaRequest extends ReplicationRequest<ReplicaRequest>>
| Modifier and Type | Method and Description |
|---|---|
void |
failShard(ShardRouting replica,
long primaryTerm,
java.lang.String message,
java.lang.Exception exception,
java.lang.Runnable onSuccess,
java.util.function.Consumer<java.lang.Exception> onPrimaryDemoted,
java.util.function.Consumer<java.lang.Exception> onIgnoredFailure)
Fail the specified shard, removing it from the current set of active shards
|
void |
markShardCopyAsStale(ShardId shardId,
java.lang.String allocationId,
long primaryTerm,
java.lang.Runnable onSuccess,
java.util.function.Consumer<java.lang.Exception> onPrimaryDemoted,
java.util.function.Consumer<java.lang.Exception> onIgnoredFailure)
Marks shard copy as stale, removing its allocation id from the set of in-sync allocation ids.
|
void |
performOn(ShardRouting replica,
ReplicaRequest replicaRequest,
ActionListener<TransportResponse.Empty> listener)
performs the the given request on the specified replica
|
void performOn(ShardRouting replica, ReplicaRequest replicaRequest, ActionListener<TransportResponse.Empty> listener)
replica - ShardRouting of the shard this request should be executed onreplicaRequest - operation to peformlistener - a callback to call once the operation has been complicated, either successfully or with an error.void failShard(ShardRouting replica, long primaryTerm, java.lang.String message, java.lang.Exception exception, java.lang.Runnable onSuccess, java.util.function.Consumer<java.lang.Exception> onPrimaryDemoted, java.util.function.Consumer<java.lang.Exception> onIgnoredFailure)
replica - shard to failprimaryTerm - the primary term of the primary shard when requesting the failuremessage - a (short) description of the reasonexception - the original exception which caused the ReplicationOperation to request the shard to be failedonSuccess - a callback to call when the shard has been successfully removed from the active set.onPrimaryDemoted - a callback to call when the shard can not be failed because the current primary has been demoted
by the master.onIgnoredFailure - a callback to call when failing a shard has failed, but it that failure can be safely ignored and thevoid markShardCopyAsStale(ShardId shardId, java.lang.String allocationId, long primaryTerm, java.lang.Runnable onSuccess, java.util.function.Consumer<java.lang.Exception> onPrimaryDemoted, java.util.function.Consumer<java.lang.Exception> onIgnoredFailure)
shardId - shard idallocationId - allocation id to remove from the set of in-sync allocation idsprimaryTerm - the primary term of the primary shard when requesting the failureonSuccess - a callback to call when the allocation id has been successfully removed from the in-sync set.onPrimaryDemoted - a callback to call when the request failed because the current primary was already demoted
by the master.onIgnoredFailure - a callback to call when the request failed, but the failure can be safely ignored.