Class CloseIndexRequest

All Implemented Interfaces:
IndicesRequest, IndicesRequest.Replaceable, AckedRequest, Writeable, org.elasticsearch.common.util.concurrent.RefCounted, TaskAwareRequest

public class CloseIndexRequest
extends AcknowledgedRequest<CloseIndexRequest>
implements IndicesRequest.Replaceable
A request to close an index.
  • Constructor Details

    • CloseIndexRequest

      public CloseIndexRequest​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
    • CloseIndexRequest

      public CloseIndexRequest()
    • CloseIndexRequest

      public CloseIndexRequest​(java.lang.String... indices)
      Constructs a new close index request for the specified index.
  • Method Details

    • validate

      Specified by:
      validate in class ActionRequest
    • indices

      public java.lang.String[] indices()
      The indices to be closed
      Specified by:
      indices in interface IndicesRequest
      Returns:
      the indices to be closed
    • indices

      public CloseIndexRequest indices​(java.lang.String... indices)
      Sets the indices to be closed
      Specified by:
      indices in interface IndicesRequest.Replaceable
      Parameters:
      indices - the indices to be closed
      Returns:
      the request itself
    • indicesOptions

      public IndicesOptions indicesOptions()
      Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist.
      Specified by:
      indicesOptions in interface IndicesRequest
      Returns:
      the desired behaviour regarding indices to ignore and wildcard indices expressions
    • indicesOptions

      public CloseIndexRequest indicesOptions​(IndicesOptions indicesOptions)
      Specifies what type of requested indices to ignore and how to deal wild wildcard expressions. For example indices that don't exist.
      Parameters:
      indicesOptions - the desired behaviour regarding indices to ignore and wildcard indices expressions
      Returns:
      the request itself
    • waitForActiveShards

      public ActiveShardCount waitForActiveShards()
    • waitForActiveShards

      public CloseIndexRequest waitForActiveShards​(ActiveShardCount waitForActiveShards)
    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class AcknowledgedRequest<CloseIndexRequest>
      Throws:
      java.io.IOException