Package org.apache.lucene.index
Class BufferedUpdates
- java.lang.Object
-
- org.apache.lucene.index.BufferedUpdates
-
- All Implemented Interfaces:
Accountable
class BufferedUpdates extends java.lang.Object implements Accountable
Holds buffered deletes and updates, by docID, term or query for a single segment. This is used to hold buffered pending deletes and updates against the to-be-flushed segment. Once the deletes and updates are pushed (on flush in DocumentsWriter), they are converted to aFrozenBufferedUpdatesinstance and pushed to theBufferedUpdatesStream.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static intBYTES_PER_DEL_QUERY(package private) static intBYTES_PER_DEL_TERMprivate CounterbytesUsed(package private) java.util.Map<Query,java.lang.Integer>deleteQueries(package private) java.util.Map<Term,java.lang.Integer>deleteTerms(package private) java.util.Map<java.lang.String,FieldUpdatesBuffer>fieldUpdates(package private) CounterfieldUpdatesBytesUsed(package private) longgenstatic java.lang.IntegerMAX_INT(package private) java.util.concurrent.atomic.AtomicIntegernumFieldUpdates(package private) java.util.concurrent.atomic.AtomicIntegernumTermDeletes(package private) java.lang.StringsegmentNameprivate CountertermsBytesUsedprivate static booleanVERBOSE_DELETES-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description BufferedUpdates(java.lang.String segmentName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidaddBinaryUpdate(DocValuesUpdate.BinaryDocValuesUpdate update, int docIDUpto)(package private) voidaddNumericUpdate(DocValuesUpdate.NumericDocValuesUpdate update, int docIDUpto)voidaddQuery(Query query, int docIDUpto)voidaddTerm(Term term, int docIDUpto)(package private) booleanany()(package private) voidclear()(package private) voidclearDeleteTerms()longramBytesUsed()Return the memory usage of this object in bytes.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Field Detail
-
BYTES_PER_DEL_TERM
static final int BYTES_PER_DEL_TERM
-
BYTES_PER_DEL_QUERY
static final int BYTES_PER_DEL_QUERY
-
numTermDeletes
final java.util.concurrent.atomic.AtomicInteger numTermDeletes
-
numFieldUpdates
final java.util.concurrent.atomic.AtomicInteger numFieldUpdates
-
deleteTerms
final java.util.Map<Term,java.lang.Integer> deleteTerms
-
deleteQueries
final java.util.Map<Query,java.lang.Integer> deleteQueries
-
fieldUpdates
final java.util.Map<java.lang.String,FieldUpdatesBuffer> fieldUpdates
-
MAX_INT
public static final java.lang.Integer MAX_INT
-
bytesUsed
private final Counter bytesUsed
-
fieldUpdatesBytesUsed
final Counter fieldUpdatesBytesUsed
-
termsBytesUsed
private final Counter termsBytesUsed
-
VERBOSE_DELETES
private static final boolean VERBOSE_DELETES
- See Also:
- Constant Field Values
-
gen
long gen
-
segmentName
final java.lang.String segmentName
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
addQuery
public void addQuery(Query query, int docIDUpto)
-
addTerm
public void addTerm(Term term, int docIDUpto)
-
addNumericUpdate
void addNumericUpdate(DocValuesUpdate.NumericDocValuesUpdate update, int docIDUpto)
-
addBinaryUpdate
void addBinaryUpdate(DocValuesUpdate.BinaryDocValuesUpdate update, int docIDUpto)
-
clearDeleteTerms
void clearDeleteTerms()
-
clear
void clear()
-
any
boolean any()
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsedin interfaceAccountable
-
-