public class ShrinkRequestBuilder extends AcknowledgedRequestBuilder<ShrinkRequest,ShrinkResponse,ShrinkRequestBuilder>
action, client, request
Constructor and Description |
---|
ShrinkRequestBuilder(ElasticsearchClient client,
ShrinkAction action) |
Modifier and Type | Method and Description |
---|---|
ShrinkRequestBuilder |
setSettings(Settings settings) |
ShrinkRequestBuilder |
setSourceIndex(java.lang.String index) |
ShrinkRequestBuilder |
setTargetIndex(CreateIndexRequest request) |
ShrinkRequestBuilder |
setWaitForActiveShards(ActiveShardCount waitForActiveShards)
Sets the number of shard copies that should be active for creation of the
new shrunken index to return.
|
ShrinkRequestBuilder |
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
beforeExecute, execute, execute, get, get, get, request
public ShrinkRequestBuilder(ElasticsearchClient client, ShrinkAction action)
public ShrinkRequestBuilder setTargetIndex(CreateIndexRequest request)
public ShrinkRequestBuilder setSourceIndex(java.lang.String index)
public ShrinkRequestBuilder setSettings(Settings settings)
public ShrinkRequestBuilder 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.
Index creation will only wait up until the timeout value for the number of shard copies
to be active before returning. Check CreateIndexResponse.isShardsAcked()
to
determine if the requisite shard copies were all started before returning or timing out.waitForActiveShards
- number of active shard copies to wait onpublic ShrinkRequestBuilder 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.