Module org.elasticsearch.server
Record Class TrackingNumericDocValues
java.lang.Object
java.lang.Record
org.elasticsearch.index.mapper.blockloader.docvalues.tracking.TrackingNumericDocValues
- All Implemented Interfaces:
Closeable,AutoCloseable,Releasable
public record TrackingNumericDocValues(CircuitBreaker breaker, org.apache.lucene.index.NumericDocValues docValues)
extends Record
implements Releasable
Wraps a
NumericDocValues, reserving some space in a CircuitBreaker
while it is live.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longCircuit breaker space reserved for each reader. -
Constructor Summary
ConstructorsConstructorDescriptionTrackingNumericDocValues(CircuitBreaker breaker, org.apache.lucene.index.NumericDocValues docValues) Creates an instance of aTrackingNumericDocValuesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbreaker()Returns the value of thebreakerrecord component.voidclose()org.apache.lucene.index.NumericDocValuesReturns the value of thedocValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.static TrackingNumericDocValuesget(CircuitBreaker breaker, org.apache.lucene.index.LeafReaderContext context, String fieldName) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ESTIMATED_SIZE
public static final long ESTIMATED_SIZECircuit breaker space reserved for each reader. Measured in heap dumps around 500 bytes and this is an intention overestimate.
-
-
Constructor Details
-
TrackingNumericDocValues
public TrackingNumericDocValues(CircuitBreaker breaker, org.apache.lucene.index.NumericDocValues docValues) Creates an instance of aTrackingNumericDocValuesrecord class.- Parameters:
breaker- the value for thebreakerrecord componentdocValues- the value for thedocValuesrecord component
-
-
Method Details
-
get
public static TrackingNumericDocValues get(CircuitBreaker breaker, org.apache.lucene.index.LeafReaderContext context, String fieldName) throws IOException - Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-
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). -
breaker
Returns the value of thebreakerrecord component.- Returns:
- the value of the
breakerrecord component
-
docValues
public org.apache.lucene.index.NumericDocValues docValues()Returns the value of thedocValuesrecord component.- Returns:
- the value of the
docValuesrecord component
-