Class ResizeRequestBuilder
- java.lang.Object
-
- org.elasticsearch.action.ActionRequestBuilder<Request,Response,RequestBuilder>
-
- org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder<Request,Response,RequestBuilder>
-
- org.elasticsearch.action.support.master.AcknowledgedRequestBuilder<ResizeRequest,ResizeResponse,ResizeRequestBuilder>
-
- org.elasticsearch.action.admin.indices.shrink.ResizeRequestBuilder
-
public class ResizeRequestBuilder extends AcknowledgedRequestBuilder<ResizeRequest,ResizeResponse,ResizeRequestBuilder>
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request
-
-
Constructor Summary
Constructors Constructor Description ResizeRequestBuilder(ElasticsearchClient client, Action<ResizeRequest,ResizeResponse,ResizeRequestBuilder> action)
-
Method Summary
Modifier and Type Method Description ResizeRequestBuilder
setResizeType(ResizeType type)
ResizeRequestBuilder
setSettings(Settings settings)
ResizeRequestBuilder
setSourceIndex(java.lang.String index)
ResizeRequestBuilder
setTargetIndex(CreateIndexRequest request)
ResizeRequestBuilder
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.ResizeRequestBuilder
setWaitForActiveShards(ActiveShardCount waitForActiveShards)
Sets the number of shard copies that should be active for creation of the new shrunken index 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
-
ResizeRequestBuilder
public ResizeRequestBuilder(ElasticsearchClient client, Action<ResizeRequest,ResizeResponse,ResizeRequestBuilder> action)
-
-
Method Detail
-
setTargetIndex
public ResizeRequestBuilder setTargetIndex(CreateIndexRequest request)
-
setSourceIndex
public ResizeRequestBuilder setSourceIndex(java.lang.String index)
-
setSettings
public ResizeRequestBuilder setSettings(Settings settings)
-
setWaitForActiveShards
public ResizeRequestBuilder setWaitForActiveShards(ActiveShardCount waitForActiveShards)
Sets the number of shard copies that should be active for creation of the new shrunken index 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. Index creation will only wait up until the timeout value for the number of shard copies to be active before returning. CheckShardsAcknowledgedResponse.isShardsAcknowledged()
to determine if the requisite shard copies were all started before returning or timing out.- Parameters:
waitForActiveShards
- number of active shard copies to wait on
-
setWaitForActiveShards
public ResizeRequestBuilder 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.
-
setResizeType
public ResizeRequestBuilder setResizeType(ResizeType type)
-
-