public class OpenIndexRequestBuilder extends AcknowledgedRequestBuilder<OpenIndexRequest,OpenIndexResponse,OpenIndexRequestBuilder>
action, client, request
Constructor and Description |
---|
OpenIndexRequestBuilder(ElasticsearchClient client,
OpenIndexAction action) |
OpenIndexRequestBuilder(ElasticsearchClient client,
OpenIndexAction action,
java.lang.String... indices) |
Modifier and Type | Method and Description |
---|---|
OpenIndexRequestBuilder |
setIndices(java.lang.String... indices)
Sets the indices to be opened
|
OpenIndexRequestBuilder |
setIndicesOptions(IndicesOptions indicesOptions)
Specifies what type of requested indices to ignore and how to deal with wildcard indices expressions.
|
OpenIndexRequestBuilder |
setWaitForActiveShards(ActiveShardCount waitForActiveShards)
Sets the number of shard copies that should be active for indices opening to return.
|
OpenIndexRequestBuilder |
setWaitForActiveShards(int waitForActiveShards)
A shortcut for
setWaitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount. |
setTimeout, setTimeout
setMasterNodeTimeout, setMasterNodeTimeout
public OpenIndexRequestBuilder(ElasticsearchClient client, OpenIndexAction action)
public OpenIndexRequestBuilder(ElasticsearchClient client, OpenIndexAction action, java.lang.String... indices)
public OpenIndexRequestBuilder setIndices(java.lang.String... indices)
indices
- the indices to be openedpublic OpenIndexRequestBuilder setIndicesOptions(IndicesOptions indicesOptions)
indicesOptions
- the desired behaviour regarding indices to ignore and wildcard indices expressionspublic OpenIndexRequestBuilder setWaitForActiveShards(ActiveShardCount waitForActiveShards)
ActiveShardCount.DEFAULT
, which will wait for one shard copy
(the primary) to become active. Set this value to ActiveShardCount.ALL
to
wait for all shards (primary and all replicas) to be active before returning.
Otherwise, use ActiveShardCount.from(int)
to set this value to any
non-negative integer, up to the number of copies per shard (number of replicas + 1),
to wait for the desired amount of shard copies to become active before returning.
Indices opening will only wait up until the timeout value for the number of shard copies
to be active before returning. Check OpenIndexResponse.isShardsAcknowledged()
to
determine if the requisite shard copies were all started before returning or timing out.waitForActiveShards
- number of active shard copies to wait onpublic OpenIndexRequestBuilder setWaitForActiveShards(int waitForActiveShards)
setWaitForActiveShards(ActiveShardCount)
where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount.