Record Class IndexNameExpressionResolver.ResolvedExpression

java.lang.Object
java.lang.Record
org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.ResolvedExpression
Record Components:
resource - the name of a resource that an expression refers to.
selector - optionally indicates which part of a resource to target during an operation. A null value indicates selectors are unsupported in an API and the default data component of the expression should be used where applicable.
Enclosing class:
IndexNameExpressionResolver

public static record IndexNameExpressionResolver.ResolvedExpression(String resource, IndexComponentSelector selector) extends Record
This represents a resolved expression in the form of the name of a resource in the cluster and a potential selector which defines which part of the resource the expression is targeting.
  • Constructor Details

    • ResolvedExpression

      public ResolvedExpression(String indexAbstraction)
    • ResolvedExpression

      public ResolvedExpression(String indexAbstraction, IndicesOptions options)
      Constructs a ResolvedExpression with the DATA selector if the selectors are allowed or null otherwise.
      Parameters:
      indexAbstraction -
      options -
    • ResolvedExpression

      public ResolvedExpression(String resource, @Nullable IndexComponentSelector selector)
      Creates an instance of a ResolvedExpression record class.
      Parameters:
      resource - the value for the resource record component
      selector - the value for the selector record component
  • Method Details

    • combined

      public String combined()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • resource

      public String resource()
      Returns the value of the resource record component.
      Returns:
      the value of the resource record component
    • selector

      @Nullable public IndexComponentSelector selector()
      Returns the value of the selector record component.
      Returns:
      the value of the selector record component