public class RolloverRequestBuilder extends MasterNodeOperationRequestBuilder<RolloverRequest,RolloverResponse,RolloverRequestBuilder>
action, client, request
Constructor and Description |
---|
RolloverRequestBuilder(ElasticsearchClient client,
RolloverAction action) |
Modifier and Type | Method and Description |
---|---|
RolloverRequestBuilder |
addMaxIndexAgeCondition(TimeValue age) |
RolloverRequestBuilder |
addMaxIndexDocsCondition(long docs) |
RolloverRequestBuilder |
alias(Alias alias) |
RolloverRequestBuilder |
dryRun(boolean dryRun) |
RolloverRequestBuilder |
mapping(java.lang.String type,
java.lang.String source) |
RolloverRequestBuilder |
setAlias(java.lang.String alias) |
RolloverRequestBuilder |
setNewIndexName(java.lang.String newIndexName) |
RolloverRequestBuilder |
settings(Settings settings) |
RolloverRequestBuilder |
waitForActiveShards(ActiveShardCount waitForActiveShards)
Sets the number of shard copies that should be active for creation of the
new rollover index to return.
|
RolloverRequestBuilder |
waitForActiveShards(int waitForActiveShards)
A shortcut for
waitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount. |
setMasterNodeTimeout, setMasterNodeTimeout
beforeExecute, execute, execute, get, get, get, request
public RolloverRequestBuilder(ElasticsearchClient client, RolloverAction action)
public RolloverRequestBuilder setAlias(java.lang.String alias)
public RolloverRequestBuilder setNewIndexName(java.lang.String newIndexName)
public RolloverRequestBuilder addMaxIndexAgeCondition(TimeValue age)
public RolloverRequestBuilder addMaxIndexDocsCondition(long docs)
public RolloverRequestBuilder dryRun(boolean dryRun)
public RolloverRequestBuilder settings(Settings settings)
public RolloverRequestBuilder alias(Alias alias)
public RolloverRequestBuilder mapping(java.lang.String type, java.lang.String source)
public RolloverRequestBuilder waitForActiveShards(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 RolloverResponse.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 RolloverRequestBuilder waitForActiveShards(int waitForActiveShards)
waitForActiveShards(ActiveShardCount)
where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount.