public static interface ReplicationOperation.Replicas<ReplicaRequest extends ReplicationRequest<ReplicaRequest>>
Modifier and Type | Method and Description |
---|---|
void |
failShard(ShardRouting replica,
ShardRouting primary,
java.lang.String message,
java.lang.Throwable throwable,
java.lang.Runnable onSuccess,
java.util.function.Consumer<java.lang.Throwable> onPrimaryDemoted,
java.util.function.Consumer<java.lang.Throwable> onIgnoredFailure)
Fail the specified shard, removing it from the current set of active shards
|
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, ShardRouting primary, java.lang.String message, java.lang.Throwable throwable, java.lang.Runnable onSuccess, java.util.function.Consumer<java.lang.Throwable> onPrimaryDemoted, java.util.function.Consumer<java.lang.Throwable> onIgnoredFailure)
replica
- shard to failprimary
- the primary shard that requested the failuremessage
- a (short) description of the reasonthrowable
- 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 the
replication operation can finish processing
Note: this callback should be used in extreme situations, typically node shutdown.