Module org.elasticsearch.server
Class SortingNumericLongValues
java.lang.Object
org.elasticsearch.index.fielddata.SortedNumericLongValues
org.elasticsearch.index.fielddata.SortingNumericLongValues
- Direct Known Subclasses:
CellIdSource.CellMultiValues,ScriptLongValues
Base class for building
SortedNumericLongValues instances based on unsorted content.-
Field Summary
FieldsFields inherited from class org.elasticsearch.index.fielddata.SortedNumericLongValues
EMPTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedSortingNumericLongValues(LongConsumer circuitBreakerConsumer) -
Method Summary
Modifier and TypeMethodDescriptionfinal intRetrieves the number of values for the current document.protected intGet the size of the internal array using a method so we can override it during testingprotected voidgrowExact(int newValuesLength) Grow the array in a method so we can override it during testingfinal longIterates to the next value in the current document.protected final voidresize(int newSize) Set thedocValueCount()and ensure that thevaluesarray can store at least that many entries.protected final voidsort()Methods inherited from class org.elasticsearch.index.fielddata.SortedNumericLongValues
advanceExact, singleton, unwrapSingleton, wrap
-
Field Details
-
values
protected long[] values -
valuesCursor
protected int valuesCursor
-
-
Constructor Details
-
SortingNumericLongValues
protected SortingNumericLongValues() -
SortingNumericLongValues
-
-
Method Details
-
resize
protected final void resize(int newSize) Set thedocValueCount()and ensure that thevaluesarray can store at least that many entries. -
growExact
protected void growExact(int newValuesLength) Grow the array in a method so we can override it during testing -
getArrayLength
protected int getArrayLength()Get the size of the internal array using a method so we can override it during testing -
sort
protected final void sort() -
docValueCount
public final int docValueCount()Description copied from class:SortedNumericLongValuesRetrieves the number of values for the current document. This must always be greater than zero. It is illegal to call this method afterSortedNumericLongValues.advanceExact(int)returnedfalse.- Specified by:
docValueCountin classSortedNumericLongValues
-
nextValue
public final long nextValue()Description copied from class:SortedNumericLongValuesIterates to the next value in the current document. Do not call this more thanSortedNumericLongValues.docValueCount()times for the document.- Specified by:
nextValuein classSortedNumericLongValues
-