Class RolloverRequest

    • Constructor Detail

      • RolloverRequest

        public RolloverRequest​(java.lang.String alias,
                               java.lang.String newIndexName)
    • Method Detail

      • indices

        public java.lang.String[] indices()
        Description copied from interface: IndicesRequest
        Returns the array of indices that the action relates to
        Specified by:
        indices in interface IndicesRequest
      • indicesOptions

        public IndicesOptions indicesOptions()
        Description copied from interface: IndicesRequest
        Returns the indices options used to resolve indices. They tell for instance whether a single index is accepted, whether an empty array will be converted to _all, and how wildcards will be expanded if needed.
        Specified by:
        indicesOptions in interface IndicesRequest
      • setAlias

        public void setAlias​(java.lang.String alias)
        Sets the alias to rollover to another index
      • setNewIndexName

        public void setNewIndexName​(java.lang.String newIndexName)
        Sets the alias to rollover to another index
      • dryRun

        public void dryRun​(boolean dryRun)
        Sets if the rollover should not be executed when conditions are met
      • addMaxIndexAgeCondition

        public void addMaxIndexAgeCondition​(TimeValue age)
        Adds condition to check if the index is at least age old
      • addMaxIndexDocsCondition

        public void addMaxIndexDocsCondition​(long numDocs)
        Adds condition to check if the index has at least numDocs
      • addMaxIndexSizeCondition

        public void addMaxIndexSizeCondition​(ByteSizeValue size)
        Adds a size-based condition to check if the index size is at least size.
      • isDryRun

        public boolean isDryRun()
      • getConditions

        public java.util.Map<java.lang.String,​Condition<?>> getConditions()
      • getAlias

        public java.lang.String getAlias()
      • getNewIndexName

        public java.lang.String getNewIndexName()
      • getCreateIndexRequest

        public CreateIndexRequest getCreateIndexRequest()
        Returns the inner CreateIndexRequest. Allows to configure mappings, settings and aliases for the new index.
      • fromXContent

        public void fromXContent​(boolean isTypeIncluded,
                                 XContentParser parser)
                          throws java.io.IOException
        Throws:
        java.io.IOException