Class RolloverRequestBuilder
java.lang.Object
org.elasticsearch.action.ActionRequestBuilder<Request,Response>
org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder<RolloverRequest,RolloverResponse,RolloverRequestBuilder>
org.elasticsearch.action.admin.indices.rollover.RolloverRequestBuilder
public class RolloverRequestBuilder extends MasterNodeOperationRequestBuilder<RolloverRequest,RolloverResponse,RolloverRequestBuilder>
-
Field Summary
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request -
Constructor Summary
Constructors Constructor Description RolloverRequestBuilder(ElasticsearchClient client, RolloverAction action) -
Method Summary
Modifier and Type Method Description RolloverRequestBuilderaddMaxIndexAgeCondition(org.elasticsearch.common.unit.TimeValue age)RolloverRequestBuilderaddMaxIndexDocsCondition(long docs)RolloverRequestBuilderaddMaxIndexSizeCondition(ByteSizeValue size)RolloverRequestBuilderaddMaxPrimaryShardSizeCondition(ByteSizeValue size)RolloverRequestBuilderalias(Alias alias)RolloverRequestBuilderdryRun(boolean dryRun)RolloverRequestBuildermapping(java.lang.String type, java.lang.Object... source)RolloverRequestBuildermapping(java.lang.String type, java.lang.String source, org.elasticsearch.common.xcontent.XContentType xContentType)RolloverRequestBuildersetNewIndexName(java.lang.String newIndexName)RolloverRequestBuildersetRolloverTarget(java.lang.String rolloverTarget)RolloverRequestBuildersettings(Settings settings)RolloverRequestBuilderwaitForActiveShards(int waitForActiveShards)A shortcut forwaitForActiveShards(ActiveShardCount)where the numerical shard count is passed in, instead of having to first callActiveShardCount.from(int)to get the ActiveShardCount.RolloverRequestBuilderwaitForActiveShards(ActiveShardCount waitForActiveShards)Sets the number of shard copies that should be active for creation of the new rollover index to return.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder
setMasterNodeTimeout, setMasterNodeTimeoutMethods inherited from class org.elasticsearch.action.ActionRequestBuilder
execute, execute, get, get, get, requestMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
RolloverRequestBuilder
-
-
Method Details
-
setRolloverTarget
-
setNewIndexName
-
addMaxIndexAgeCondition
-
addMaxIndexDocsCondition
-
addMaxIndexSizeCondition
-
addMaxPrimaryShardSizeCondition
-
dryRun
-
settings
-
alias
-
mapping
-
mapping
public RolloverRequestBuilder mapping(java.lang.String type, java.lang.String source, org.elasticsearch.common.xcontent.XContentType xContentType) -
waitForActiveShards
Sets the number of shard copies that should be active for creation of the new rollover index to return. Defaults toActiveShardCount.DEFAULT, which will wait for one shard copy (the primary) to become active. Set this value toActiveShardCount.ALLto 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. CheckRolloverResponse.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
-
waitForActiveShards
A shortcut forwaitForActiveShards(ActiveShardCount)where the numerical shard count is passed in, instead of having to first callActiveShardCount.from(int)to get the ActiveShardCount.
-