- java.lang.Object
-
- org.apache.lucene.index.BufferedUpdates.DeletedTerms
-
- All Implemented Interfaces:
Accountable
- Enclosing class:
- BufferedUpdates
static class BufferedUpdates.DeletedTerms extends java.lang.Object implements Accountable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
BufferedUpdates.DeletedTerms.DeletedTermConsumer<E extends java.lang.Exception>
-
Field Summary
Fields Modifier and Type Field Description private Counter
bytesUsed
private java.util.Map<java.lang.String,BufferedUpdates.BytesRefIntMap>
deleteTerms
private ByteBlockPool
pool
private int
termsSize
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description DeletedTerms()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
clear()
(package private) <E extends java.lang.Exception>
voidforEachOrdered(BufferedUpdates.DeletedTerms.DeletedTermConsumer<E> consumer)
Consume all terms in a sorted order.(package private) int
get(Term term)
Get the newest doc id of the deleted term.(package private) ByteBlockPool
getPool()
Visible for testing.(package private) boolean
isEmpty()
(package private) java.util.Set<Term>
keySet()
Just for test, not efficient.(package private) void
put(Term term, int value)
Put the newest doc id of the deleted term.long
ramBytesUsed()
Return the memory usage of this object in bytes.(package private) int
size()
java.lang.String
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 Detail
-
bytesUsed
private final Counter bytesUsed
-
pool
private final ByteBlockPool pool
-
deleteTerms
private final java.util.Map<java.lang.String,BufferedUpdates.BytesRefIntMap> deleteTerms
-
termsSize
private int termsSize
-
-
Method Detail
-
get
int get(Term term)
Get the newest doc id of the deleted term.- Parameters:
term
- The deleted term.- Returns:
- The newest doc id of this deleted term.
-
put
void put(Term term, int value)
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
java.util.Set<Term> keySet()
Just for test, not efficient.
-
forEachOrdered
<E extends java.lang.Exception> void forEachOrdered(BufferedUpdates.DeletedTerms.DeletedTermConsumer<E> consumer) throws E extends java.lang.Exception
Consume all terms in a sorted order.Note: This is a destructive operation as it calls
BytesRefHash.sort()
.- Throws:
E extends java.lang.Exception
- See Also:
BytesRefHash.sort()
-
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
public java.lang.String toString()
Used forBufferedUpdates.VERBOSE_DELETES
.- Overrides:
toString
in classjava.lang.Object
-
-