public class ActiveShardsObserver extends AbstractComponent
ActionListener.deprecationLogger, logger, settings| Constructor | Description |
|---|---|
ActiveShardsObserver(Settings settings,
ClusterService clusterService,
ThreadPool threadPool) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
waitForActiveShards(java.lang.String[] indexNames,
ActiveShardCount activeShardCount,
TimeValue timeout,
java.util.function.Consumer<java.lang.Boolean> onResult,
java.util.function.Consumer<java.lang.Exception> onFailure) |
Waits on the specified number of active shards to be started before executing the
|
logDeprecatedSetting, logRemovedSetting, nodeNamepublic ActiveShardsObserver(Settings settings, ClusterService clusterService, ThreadPool threadPool)
public void waitForActiveShards(java.lang.String[] indexNames,
ActiveShardCount activeShardCount,
TimeValue timeout,
java.util.function.Consumer<java.lang.Boolean> onResult,
java.util.function.Consumer<java.lang.Exception> onFailure)
indexNames - the indices to wait for active shards onactiveShardCount - the number of active shards to wait on before returningtimeout - the timeout valueonResult - a function that is executed in response to the requisite shards becoming active or a timeout (whichever comes first)onFailure - a function that is executed in response to an error occurring during waiting for the active shards