Package org.apache.lucene.index
Class NumericDocValuesFieldUpdates
- java.lang.Object
-
- org.apache.lucene.index.DocValuesFieldUpdates
-
- org.apache.lucene.index.NumericDocValuesFieldUpdates
-
- All Implemented Interfaces:
Accountable
final class NumericDocValuesFieldUpdates extends DocValuesFieldUpdates
ADocValuesFieldUpdates
which holds updates of documents, of a singleNumericDocValuesField
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
NumericDocValuesFieldUpdates.Iterator
(package private) static class
NumericDocValuesFieldUpdates.SingleValueNumericDocValuesFieldUpdates
-
Nested classes/interfaces inherited from class org.apache.lucene.index.DocValuesFieldUpdates
DocValuesFieldUpdates.AbstractIterator, DocValuesFieldUpdates.SingleValueDocValuesFieldUpdates
-
-
Field Summary
Fields Modifier and Type Field Description private long
minValue
private AbstractPagedMutable<?>
values
-
Fields inherited from class org.apache.lucene.index.DocValuesFieldUpdates
delGen, docs, field, maxDoc, PAGE_SIZE, size, type
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description NumericDocValuesFieldUpdates(long delGen, java.lang.String field, int maxDoc)
NumericDocValuesFieldUpdates(long delGen, java.lang.String field, long minValue, long maxValue, int maxDoc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
add(int doc, long value)
(package private) void
add(int docId, DocValuesFieldUpdates.Iterator iterator)
Adds the value for the given docID.(package private) void
add(int doc, BytesRef value)
protected void
grow(int size)
(package private) NumericDocValuesFieldUpdates.Iterator
iterator()
Returns anDocValuesFieldUpdates.Iterator
over the updated documents and their values.long
ramBytesUsed()
Return the memory usage of this object in bytes.protected void
resize(int size)
protected void
swap(int i, int j)
-
Methods inherited from class org.apache.lucene.index.DocValuesFieldUpdates
add, any, ensureFinished, finish, getFinished, mergedIterator, reset, size
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Field Detail
-
values
private AbstractPagedMutable<?> values
-
minValue
private final long minValue
-
-
Method Detail
-
add
void add(int doc, BytesRef value)
- Specified by:
add
in classDocValuesFieldUpdates
-
add
void add(int docId, DocValuesFieldUpdates.Iterator iterator)
Description copied from class:DocValuesFieldUpdates
Adds the value for the given docID. This method prevents conditional calls toDocValuesFieldUpdates.Iterator.longValue()
orDocValuesFieldUpdates.Iterator.binaryValue()
since the implementation knows if it's a long value iterator or binary value- Specified by:
add
in classDocValuesFieldUpdates
-
add
void add(int doc, long value)
- Specified by:
add
in classDocValuesFieldUpdates
-
swap
protected void swap(int i, int j)
- Overrides:
swap
in classDocValuesFieldUpdates
-
grow
protected void grow(int size)
- Overrides:
grow
in classDocValuesFieldUpdates
-
resize
protected void resize(int size)
- Overrides:
resize
in classDocValuesFieldUpdates
-
iterator
NumericDocValuesFieldUpdates.Iterator iterator()
Description copied from class:DocValuesFieldUpdates
Returns anDocValuesFieldUpdates.Iterator
over the updated documents and their values.- Specified by:
iterator
in classDocValuesFieldUpdates
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsed
in interfaceAccountable
- Overrides:
ramBytesUsed
in classDocValuesFieldUpdates
-
-