Class CloseIndexRequestBuilder
- java.lang.Object
-
- org.elasticsearch.action.ActionRequestBuilder<Request,Response>
-
- org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder<Request,Response,RequestBuilder>
-
- org.elasticsearch.action.support.master.AcknowledgedRequestBuilder<CloseIndexRequest,CloseIndexResponse,CloseIndexRequestBuilder>
-
- org.elasticsearch.action.admin.indices.close.CloseIndexRequestBuilder
-
public class CloseIndexRequestBuilder extends AcknowledgedRequestBuilder<CloseIndexRequest,CloseIndexResponse,CloseIndexRequestBuilder>
Builder for close index request
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request
-
-
Constructor Summary
Constructors Constructor Description CloseIndexRequestBuilder(ElasticsearchClient client, CloseIndexAction action)
CloseIndexRequestBuilder(ElasticsearchClient client, CloseIndexAction action, java.lang.String... indices)
-
Method Summary
Modifier and Type Method Description CloseIndexRequestBuilder
setIndices(java.lang.String... indices)
Sets the indices to be closedCloseIndexRequestBuilder
setIndicesOptions(IndicesOptions indicesOptions)
Specifies what type of requested indices to ignore and wildcard indices expressions For example indices that don't exist.CloseIndexRequestBuilder
setWaitForActiveShards(int waitForActiveShards)
A shortcut forsetWaitForActiveShards(ActiveShardCount)
where the numerical shard count is passed in, instead of having to first callActiveShardCount.from(int)
to get the ActiveShardCount.CloseIndexRequestBuilder
setWaitForActiveShards(ActiveShardCount waitForActiveShards)
Sets the number of shard copies that should be active for indices closing to return.-
Methods inherited from class org.elasticsearch.action.support.master.AcknowledgedRequestBuilder
setTimeout, setTimeout
-
Methods inherited from class org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder
setMasterNodeTimeout, setMasterNodeTimeout
-
-
-
-
Constructor Detail
-
CloseIndexRequestBuilder
public CloseIndexRequestBuilder(ElasticsearchClient client, CloseIndexAction action)
-
CloseIndexRequestBuilder
public CloseIndexRequestBuilder(ElasticsearchClient client, CloseIndexAction action, java.lang.String... indices)
-
-
Method Detail
-
setIndices
public CloseIndexRequestBuilder setIndices(java.lang.String... indices)
Sets the indices to be closed- Parameters:
indices
- the indices to be closed- Returns:
- the request itself
-
setIndicesOptions
public CloseIndexRequestBuilder setIndicesOptions(IndicesOptions indicesOptions)
Specifies what type of requested indices to ignore and wildcard indices expressions For example indices that don't exist.- Parameters:
indicesOptions
- the desired behaviour regarding indices to ignore and indices wildcard expressions- Returns:
- the request itself
-
setWaitForActiveShards
public CloseIndexRequestBuilder setWaitForActiveShards(ActiveShardCount waitForActiveShards)
Sets the number of shard copies that should be active for indices closing to return. Defaults toActiveShardCount.DEFAULT
, which will wait for one shard copy (the primary) to become active. Set this value toActiveShardCount.ALL
to wait for all shards (primary and all replicas) to be active before returning. Otherwise, useActiveShardCount.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 closing will only wait up until the timeout value for the number of shard copies to be active before returning.- Parameters:
waitForActiveShards
- number of active shard copies to wait on
-
setWaitForActiveShards
public CloseIndexRequestBuilder setWaitForActiveShards(int waitForActiveShards)
A shortcut forsetWaitForActiveShards(ActiveShardCount)
where the numerical shard count is passed in, instead of having to first callActiveShardCount.from(int)
to get the ActiveShardCount.
-
-