Class RolloverRequest
java.lang.Object
org.opensearch.client.TimedRequest
org.opensearch.client.indices.rollover.RolloverRequest
- All Implemented Interfaces:
Validatable
,org.opensearch.common.xcontent.ToXContent
,org.opensearch.common.xcontent.ToXContentObject
public class RolloverRequest
extends TimedRequest
implements org.opensearch.common.xcontent.ToXContentObject
Request class to swap index under an alias upon satisfying conditions
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent
org.opensearch.common.xcontent.ToXContent.DelegatingMapParams, org.opensearch.common.xcontent.ToXContent.MapParams, org.opensearch.common.xcontent.ToXContent.Params
-
Field Summary
Fields inherited from class org.opensearch.client.TimedRequest
DEFAULT_ACK_TIMEOUT, DEFAULT_MASTER_NODE_TIMEOUT
Fields inherited from interface org.opensearch.common.xcontent.ToXContent
EMPTY_PARAMS
Fields inherited from interface org.opensearch.client.Validatable
EMPTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMaxIndexAgeCondition
(org.opensearch.common.unit.TimeValue age) Adds condition to check if the index is at leastage
oldaddMaxIndexDocsCondition
(long numDocs) Adds condition to check if the index has at leastnumDocs
addMaxIndexSizeCondition
(org.opensearch.common.unit.ByteSizeValue size) Adds a size-based condition to check if the index size is at leastsize
.dryRun
(boolean dryRun) Sets if the rollover should not be executed when conditions are metgetAlias()
Returns the alias of the rollover operationReturns all set conditionsReturns the innerCreateIndexRequest
.Returns the new index name for the rolloverboolean
isDryRun()
Returns if the rollover should not be executed when conditions are metorg.opensearch.common.xcontent.XContentBuilder
toXContent
(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params) Methods inherited from class org.opensearch.client.TimedRequest
masterNodeTimeout, setMasterTimeout, setTimeout, timeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opensearch.common.xcontent.ToXContentObject
isFragment
Methods inherited from interface org.opensearch.client.Validatable
validate
-
Constructor Details
-
RolloverRequest
-
-
Method Details
-
getAlias
Returns the alias of the rollover operation -
getNewIndexName
Returns the new index name for the rollover -
dryRun
Sets if the rollover should not be executed when conditions are met -
isDryRun
public boolean isDryRun()Returns if the rollover should not be executed when conditions are met -
addMaxIndexAgeCondition
Adds condition to check if the index is at leastage
old -
addMaxIndexDocsCondition
Adds condition to check if the index has at leastnumDocs
-
addMaxIndexSizeCondition
Adds a size-based condition to check if the index size is at leastsize
. -
getConditions
Returns all set conditions -
getCreateIndexRequest
Returns the innerCreateIndexRequest
. Allows to configure mappings, settings and aliases for the new index. -
toXContent
public org.opensearch.common.xcontent.XContentBuilder toXContent(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.opensearch.common.xcontent.ToXContent
- Throws:
IOException
-