- java.lang.Object
-
- org.apache.lucene.search.LRUQueryCache.LeafCache
-
- All Implemented Interfaces:
Accountable
- Enclosing class:
- LRUQueryCache
private class LRUQueryCache.LeafCache extends java.lang.Object implements Accountable
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Query,LRUQueryCache.CacheAndCount>
cache
private java.lang.Object
key
private long
ramBytesUsed
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description LeafCache(java.lang.Object key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) LRUQueryCache.CacheAndCount
get(Query query)
private void
onDocIdSetCache(long ramBytesUsed)
private void
onDocIdSetEviction(long ramBytesUsed)
(package private) void
putIfAbsent(Query query, LRUQueryCache.CacheAndCount cached)
long
ramBytesUsed()
Return the memory usage of this object in bytes.(package private) void
remove(Query query)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Field Detail
-
key
private final java.lang.Object key
-
cache
private final java.util.Map<Query,LRUQueryCache.CacheAndCount> cache
-
ramBytesUsed
private volatile long ramBytesUsed
-
-
Method Detail
-
onDocIdSetCache
private void onDocIdSetCache(long ramBytesUsed)
-
onDocIdSetEviction
private void onDocIdSetEviction(long ramBytesUsed)
-
get
LRUQueryCache.CacheAndCount get(Query query)
-
putIfAbsent
void putIfAbsent(Query query, LRUQueryCache.CacheAndCount cached)
-
remove
void remove(Query query)
-
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
-
-