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 aFrozenBufferedUpdates
instance and pushed to theBufferedUpdatesStream
.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
BYTES_PER_DEL_QUERY
(package private) static int
BYTES_PER_DEL_TERM
private Counter
bytesUsed
(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) Counter
fieldUpdatesBytesUsed
(package private) long
gen
static java.lang.Integer
MAX_INT
(package private) java.util.concurrent.atomic.AtomicInteger
numFieldUpdates
(package private) java.util.concurrent.atomic.AtomicInteger
numTermDeletes
(package private) java.lang.String
segmentName
private Counter
termsBytesUsed
private static boolean
VERBOSE_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) void
addBinaryUpdate(DocValuesUpdate.BinaryDocValuesUpdate update, int docIDUpto)
(package private) void
addNumericUpdate(DocValuesUpdate.NumericDocValuesUpdate update, int docIDUpto)
void
addQuery(Query query, int docIDUpto)
void
addTerm(Term term, int docIDUpto)
(package private) boolean
any()
(package private) void
clear()
(package private) void
clearDeleteTerms()
long
ramBytesUsed()
Return the memory usage of this object in bytes.java.lang.String
toString()
-
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:
toString
in 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:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsed
in interfaceAccountable
-
-