Module org.elasticsearch.compute
Record Class ColumnAtATimeReaderWithoutReuse
java.lang.Object
java.lang.Record
org.elasticsearch.compute.lucene.read.ColumnAtATimeReaderWithoutReuse
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.core.Releasable,BlockLoader.ColumnAtATimeReader,BlockLoader.Reader
public record ColumnAtATimeReaderWithoutReuse(CircuitBreaker breaker, org.apache.lucene.util.IOFunction<CircuitBreaker,BlockLoader.ColumnAtATimeReader> fn, Consumer<BlockLoader.Reader> track)
extends Record
implements BlockLoader.ColumnAtATimeReader
A
BlockLoader.ColumnAtATimeReader that immediately closes the reader after it is used.-
Constructor Summary
ConstructorsConstructorDescriptionColumnAtATimeReaderWithoutReuse(CircuitBreaker breaker, org.apache.lucene.util.IOFunction<CircuitBreaker, BlockLoader.ColumnAtATimeReader> fn, Consumer<BlockLoader.Reader> track) Creates an instance of aColumnAtATimeReaderWithoutReuserecord class. -
Method Summary
Modifier and TypeMethodDescriptionbreaker()Returns the value of thebreakerrecord component.booleancanReuse(int startingDocID) voidclose()final booleanIndicates whether some other object is "equal to" this one.org.apache.lucene.util.IOFunction<CircuitBreaker, BlockLoader.ColumnAtATimeReader> fn()Returns the value of thefnrecord component.final inthashCode()Returns a hash code value for this object.read(BlockLoader.BlockFactory factory, BlockLoader.Docs docs, int offset, boolean nullsFiltered) final StringtoString()Returns a string representation of this record class.track()Returns the value of thetrackrecord component.
-
Constructor Details
-
ColumnAtATimeReaderWithoutReuse
public ColumnAtATimeReaderWithoutReuse(CircuitBreaker breaker, org.apache.lucene.util.IOFunction<CircuitBreaker, BlockLoader.ColumnAtATimeReader> fn, Consumer<BlockLoader.Reader> track) Creates an instance of aColumnAtATimeReaderWithoutReuserecord class.- Parameters:
breaker- the value for thebreakerrecord componentfn- the value for thefnrecord componenttrack- the value for thetrackrecord component
-
-
Method Details
-
read
public BlockLoader.Block read(BlockLoader.BlockFactory factory, BlockLoader.Docs docs, int offset, boolean nullsFiltered) throws IOException - Specified by:
readin interfaceBlockLoader.ColumnAtATimeReader- Throws:
IOException
-
canReuse
public boolean canReuse(int startingDocID) - Specified by:
canReusein interfaceBlockLoader.Reader
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
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:
toStringin interfaceBlockLoader.Reader- Specified by:
toStringin classRecord- 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. -
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
-
fn
Returns the value of thefnrecord component.- Returns:
- the value of the
fnrecord component
-
track
Returns the value of thetrackrecord component.- Returns:
- the value of the
trackrecord component
-