Module org.elasticsearch.xcore
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionCrossClusterSearchStatsSnapshot(int totalClusters, int availableClusters, int skippedClusters, Double availabilityRatio, Set<String> stabilizedClusterAliases, Map<String, Integer> perClusterConsecutiveSkips) Creates an instance of aCrossClusterSearchStatsSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theavailabilityRatiorecord component.intReturns the value of theavailableClustersrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theperClusterConsecutiveSkipsrecord component.intReturns the value of theskippedClustersrecord component.Returns the value of thestabilizedClusterAliasesrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalClustersrecord component.toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
CrossClusterSearchStatsSnapshot
- Throws:
IOException
-
CrossClusterSearchStatsSnapshot
public CrossClusterSearchStatsSnapshot(int totalClusters, int availableClusters, int skippedClusters, Double availabilityRatio, Set<String> stabilizedClusterAliases, Map<String, Integer> perClusterConsecutiveSkips) Creates an instance of aCrossClusterSearchStatsSnapshotrecord class.- Parameters:
totalClusters- the value for thetotalClustersrecord componentavailableClusters- the value for theavailableClustersrecord componentskippedClusters- the value for theskippedClustersrecord componentavailabilityRatio- the value for theavailabilityRatiorecord componentstabilizedClusterAliases- the value for thestabilizedClusterAliasesrecord componentperClusterConsecutiveSkips- the value for theperClusterConsecutiveSkipsrecord component
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
totalClusters
public int totalClusters()Returns the value of thetotalClustersrecord component.- Returns:
- the value of the
totalClustersrecord component
-
availableClusters
public int availableClusters()Returns the value of theavailableClustersrecord component.- Returns:
- the value of the
availableClustersrecord component
-
skippedClusters
public int skippedClusters()Returns the value of theskippedClustersrecord component.- Returns:
- the value of the
skippedClustersrecord component
-
availabilityRatio
Returns the value of theavailabilityRatiorecord component.- Returns:
- the value of the
availabilityRatiorecord component
-
stabilizedClusterAliases
Returns the value of thestabilizedClusterAliasesrecord component.- Returns:
- the value of the
stabilizedClusterAliasesrecord component
-
perClusterConsecutiveSkips
Returns the value of theperClusterConsecutiveSkipsrecord component.- Returns:
- the value of the
perClusterConsecutiveSkipsrecord component
-