Module org.elasticsearch.server
Record Class BinaryAndCounts
java.lang.Object
java.lang.Record
org.elasticsearch.index.mapper.blockloader.docvalues.tracking.BinaryAndCounts
public record BinaryAndCounts(TrackingBinaryDocValues binary, TrackingNumericDocValues counts)
extends Record
A
TrackingBinaryDocValues containing encoded values and an associated
TrackingNumericDocValues containing the counts of encoded values.-
Constructor Summary
ConstructorsConstructorDescriptionBinaryAndCounts(TrackingBinaryDocValues binary, TrackingNumericDocValues counts) Creates an instance of aBinaryAndCountsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbinary()Returns the value of thebinaryrecord component.counts()Returns the value of thecountsrecord component.final booleanIndicates whether some other object is "equal to" this one.static BinaryAndCountsget(CircuitBreaker breaker, org.apache.lucene.index.LeafReaderContext context, String fieldName, boolean skipCountsIfOne) Atomically load theBinaryAndCounts.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BinaryAndCounts
Creates an instance of aBinaryAndCountsrecord class.- Parameters:
binary- the value for thebinaryrecord componentcounts- the value for thecountsrecord component
-
-
Method Details
-
get
public static BinaryAndCounts get(CircuitBreaker breaker, org.apache.lucene.index.LeafReaderContext context, String fieldName, boolean skipCountsIfOne) throws IOException Atomically load theBinaryAndCounts. If the last parameter istruethencounts()is nullable. When it is null then all counts are1.- 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. All components in this record class are compared withObjects::equals(Object,Object). -
binary
Returns the value of thebinaryrecord component.- Returns:
- the value of the
binaryrecord component
-
counts
Returns the value of thecountsrecord component.- Returns:
- the value of the
countsrecord component
-