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 Counter
private final Map
<String, BufferedUpdates.BytesRefIntMap> private final ByteBlockPool
private int
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
clear()
(package private) <E extends Exception>
voidConsume all terms in a sorted order.(package private) int
Get the newest doc id of the deleted term.(package private) ByteBlockPool
getPool()
Visible for testing.(package private) boolean
isEmpty()
keySet()
Just for test, not efficient.(package private) void
Put the newest doc id of the deleted term.long
Return the memory usage of this object in bytes.(package private) int
size()
toString()
Used forBufferedUpdates.VERBOSE_DELETES
.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 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:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsed
in interfaceAccountable
-
toString
Used forBufferedUpdates.VERBOSE_DELETES
.
-