java.lang.Object
org.apache.lucene.index.BufferedUpdates.DeletedTerms
- All Implemented Interfaces:
Accountable
- Enclosing class:
BufferedUpdates
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Counterprivate final Map<String, BufferedUpdates.BytesRefIntMap> private final ByteBlockPoolprivate intFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidclear()(package private) <E extends Exception>
voidConsume all terms in a sorted order.(package private) intGet the newest doc id of the deleted term.(package private) ByteBlockPoolgetPool()Visible for testing.(package private) booleanisEmpty()keySet()Just for test, not efficient.(package private) voidPut the newest doc id of the deleted term.longReturn the memory usage of this object in bytes.(package private) intsize()toString()Used forBufferedUpdates.VERBOSE_DELETES.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Field Details
-
bytesUsed
-
pool
-
deleteTerms
-
termsSize
private int termsSize
-
-
Constructor Details
-
DeletedTerms
DeletedTerms()
-
-
Method Details
-
get
Get the newest doc id of the deleted term.- Parameters:
term- The deleted term.- Returns:
- The newest doc id of this deleted term.
-
put
Put the newest doc id of the deleted term.- Parameters:
term- The deleted term.value- The newest doc id of the deleted term.
-
clear
void clear() -
size
int size() -
isEmpty
boolean isEmpty() -
keySet
Just for test, not efficient. -
forEachOrdered
<E extends Exception> void forEachOrdered(BufferedUpdates.DeletedTerms.DeletedTermConsumer<E> consumer) throws E Consume all terms in a sorted order.Note: This is a destructive operation as it calls
BytesRefHash.sort().- Throws:
E- See Also:
-
getPool
ByteBlockPool getPool()Visible for testing. -
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
-
toString
Used forBufferedUpdates.VERBOSE_DELETES.
-