Class DeleteSampleConfigurationAction.Request

All Implemented Interfaces:
IndicesRequest, IndicesRequest.Replaceable, Writeable, RefCounted, TaskAwareRequest, TransportRequest
Enclosing class:
DeleteSampleConfigurationAction

public static class DeleteSampleConfigurationAction.Request extends AcknowledgedRequest<DeleteSampleConfigurationAction.Request> implements IndicesRequest.Replaceable
Request class for deleting sampling configurations from indices.

This request specifies which index or data stream should have their sampling configurations removed. It extends AcknowledgedRequest to support master node timeout and acknowledgment timeout settings.

  • Constructor Details

    • Request

      public Request(@Nullable TimeValue masterNodeTimeout, @Nullable TimeValue ackTimeout)
      Constructs a new request with specified timeouts.
      Parameters:
      masterNodeTimeout - the timeout for master node operations, or null for default
      ackTimeout - the timeout for acknowledgment, or null for default
    • Request

      public Request(StreamInput in) throws IOException
      Constructs a new request by deserializing from a StreamInput.
      Parameters:
      in - the stream input to read from
      Throws:
      IOException - if an I/O error occurs during deserialization
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Serializes this request to a StreamOutput.

      This method is called during transport layer serialization when sending the request to remote nodes.

      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class AcknowledgedRequest<DeleteSampleConfigurationAction.Request>
      Parameters:
      out - the stream output to write to, must not be null
      Throws:
      IOException - if an I/O error occurs during serialization
    • indices

      public String[] indices()
      Returns the array of index names or patterns targeted by this request.

      The returned array contains the names of indices and/or data streams from which sampling configurations should be deleted. Index patterns using wildcards are supported according to the configured indicesOptions().

      Specified by:
      indices in interface IndicesRequest
      Returns:
      an array of index names or patterns, never null but may be empty
    • indices

      public IndicesRequest indices(String... indices)
      Sets the array of index name for this request.

      Specifies which index and/or data stream should have their sampling configurations deleted. Supports individual index names

      Specified by:
      indices in interface IndicesRequest.Replaceable
      Parameters:
      indices - the index names or patterns to target, null will be converted to empty array
      Returns:
      this request instance for method chaining
    • includeDataStreams

      public boolean includeDataStreams()
      Indicates whether this request should include data streams in addition to regular indices.
      Specified by:
      includeDataStreams in interface IndicesRequest
      Returns:
      true to include data streams, false to exclude them
    • indicesOptions

      public IndicesOptions indicesOptions()
      Returns the indices options that control how index name resolution is performed.

      This configuration specifies how wildcards are expanded, whether closed indices are included, and how missing indices are handled. The strict single index option ensures proper validation and prevents accidental broad operations.

      Specified by:
      indicesOptions in interface IndicesRequest
      Returns:
      the indices options for this request, never null
      See Also:
    • equals

      public boolean equals(Object o)
      Compares this request with another object for equality.

      Two delete sampling configuration requests are considered equal if they target the same indices and have the same timeout values.

      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare with, may be null
      Returns:
      true if the objects are equal, false otherwise
    • hashCode

      public int hashCode()
      Returns a hash code value for this request.

      The hash code is computed based on the target indices and timeout values, ensuring that equal requests produce the same hash code.

      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this request