Record Class CrossClusterSearchStatsSnapshot

java.lang.Object
java.lang.Record
org.elasticsearch.xpack.core.ml.datafeed.CrossClusterSearchStatsSnapshot
All Implemented Interfaces:
Writeable, ToXContent, ToXContentObject

public record CrossClusterSearchStatsSnapshot(int totalClusters, int availableClusters, int skippedClusters, Double availabilityRatio, Set<String> stabilizedClusterAliases, Map<String,Integer> perClusterConsecutiveSkips) extends Record implements Writeable, ToXContentObject
Immutable snapshot of cross-cluster search statistics for a running CPS-enabled datafeed. Serialized as part of the datafeed stats API response.
  • Constructor Details

    • CrossClusterSearchStatsSnapshot

      public CrossClusterSearchStatsSnapshot(StreamInput in) throws IOException
      Throws:
      IOException
    • CrossClusterSearchStatsSnapshot

      public CrossClusterSearchStatsSnapshot(int totalClusters, int availableClusters, int skippedClusters, Double availabilityRatio, Set<String> stabilizedClusterAliases, Map<String,Integer> perClusterConsecutiveSkips)
      Creates an instance of a CrossClusterSearchStatsSnapshot record class.
      Parameters:
      totalClusters - the value for the totalClusters record component
      availableClusters - the value for the availableClusters record component
      skippedClusters - the value for the skippedClusters record component
      availabilityRatio - the value for the availabilityRatio record component
      stabilizedClusterAliases - the value for the stabilizedClusterAliases record component
      perClusterConsecutiveSkips - the value for the perClusterConsecutiveSkips record component
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toXContent

      public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface ToXContent
      Throws:
      IOException
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • totalClusters

      public int totalClusters()
      Returns the value of the totalClusters record component.
      Returns:
      the value of the totalClusters record component
    • availableClusters

      public int availableClusters()
      Returns the value of the availableClusters record component.
      Returns:
      the value of the availableClusters record component
    • skippedClusters

      public int skippedClusters()
      Returns the value of the skippedClusters record component.
      Returns:
      the value of the skippedClusters record component
    • availabilityRatio

      public Double availabilityRatio()
      Returns the value of the availabilityRatio record component.
      Returns:
      the value of the availabilityRatio record component
    • stabilizedClusterAliases

      public Set<String> stabilizedClusterAliases()
      Returns the value of the stabilizedClusterAliases record component.
      Returns:
      the value of the stabilizedClusterAliases record component
    • perClusterConsecutiveSkips

      public Map<String,Integer> perClusterConsecutiveSkips()
      Returns the value of the perClusterConsecutiveSkips record component.
      Returns:
      the value of the perClusterConsecutiveSkips record component