com.groupbyinc.flux.common.apache.lucene.search.LRUQueryCache.class Maven / Gradle / Ivy
???? 4 =com/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache java/lang/Object :com/groupbyinc/flux/common/apache/lucene/search/QueryCache 9com/groupbyinc/flux/common/apache/lucene/util/Accountable LRUQueryCache.java Rcom/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache$CachingWrapperWeight
CachingWrapperWeight Gcom/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache$LeafCache
LeafCache Ucom/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache$MinSegmentSizePredicate MinSegmentSizePredicate ?com/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache$2 ?com/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache$1 Ccom/groupbyinc/flux/common/apache/lucene/index/IndexReader$CacheKey :com/groupbyinc/flux/common/apache/lucene/index/IndexReader CacheKey Fcom/groupbyinc/flux/common/apache/lucene/index/IndexReader$CacheHelper CacheHelper Ecom/groupbyinc/flux/common/apache/lucene/util/RoaringDocIdSet$Builder =com/groupbyinc/flux/common/apache/lucene/util/RoaringDocIdSet ! Builder Icom/groupbyinc/flux/common/apache/lucene/index/IndexReader$ClosedListener $ ClosedListener %java/lang/invoke/MethodHandles$Lookup ' java/lang/invoke/MethodHandles ) Lookup QUERY_DEFAULT_RAM_BYTES_USED J ? HASHTABLE_RAM_BYTES_PER_ENTRY $LINKED_HASHTABLE_RAM_BYTES_PER_ENTRY maxSize I maxRamBytesUsed
leavesToCache Ljava/util/function/Predicate; bLjava/util/function/Predicate;
uniqueQueries Ljava/util/Map; Ljava/util/Map; mostRecentlyUsedQueries Ljava/util/Set; HLjava/util/Set; cache ?Ljava/util/Map; lock *Ljava/util/concurrent/locks/ReentrantLock; ramBytesUsed hitCount missCount
cacheCount cacheSize $assertionsDisabled Z #(IJLjava/util/function/Predicate;)V ()V I K
L 2 3 N 4 - P 5 6 R java/util/LinkedHashMap T?@ (IFZ)V I W
U X 8 9 Z
java/util/Map \ keySet ()Ljava/util/Set; ^ _ ] ` ; < b java/util/IdentityHashMap d
e L > 9 g (java/util/concurrent/locks/ReentrantLock i
j L @ A l B - n this ?Lcom/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache; (IJ)V (IF)V I t
u I J
w onHit L(Ljava/lang/Object;Lcom/groupbyinc/flux/common/apache/lucene/search/Query;)V G H { isHeldByCurrentThread ()Z } ~
j java/lang/AssertionError ?
? L C - ?
readerCoreKey Ljava/lang/Object; query 7Lcom/groupbyinc/flux/common/apache/lucene/search/Query; onMiss D - ? onQueryCache ;(Lcom/groupbyinc/flux/common/apache/lucene/search/Query;J)V onQueryEviction onDocIdSetCache (Ljava/lang/Object;J)V F - ? E - ? onDocIdSetEviction (Ljava/lang/Object;IJ)V
numEntries sumRamBytesUsed onClear requiresEviction
java/util/Set ? size ()I ? ? ? ? ()J B ?
? get ?(Lcom/groupbyinc/flux/common/apache/lucene/search/Query;Lcom/groupbyinc/flux/common/apache/lucene/index/LeafReaderContext;Lcom/groupbyinc/flux/common/apache/lucene/index/IndexReader$CacheHelper;)Lcom/groupbyinc/flux/common/apache/lucene/search/DocIdSet; :com/groupbyinc/flux/common/apache/lucene/search/BoostQuery ? Bcom/groupbyinc/flux/common/apache/lucene/search/ConstantScoreQuery ? getKey G()Lcom/groupbyinc/flux/common/apache/lucene/index/IndexReader$CacheKey; ? ? ? &(Ljava/lang/Object;)Ljava/lang/Object; ? ? ] ? ? z
? 5com/groupbyinc/flux/common/apache/lucene/search/Query ? s(Lcom/groupbyinc/flux/common/apache/lucene/search/Query;)Lcom/groupbyinc/flux/common/apache/lucene/search/DocIdSet; ? ?
? 8com/groupbyinc/flux/common/apache/lucene/search/DocIdSet ? y z
? key context BLcom/groupbyinc/flux/common/apache/lucene/index/LeafReaderContext; cacheHelper HLcom/groupbyinc/flux/common/apache/lucene/index/IndexReader$CacheHelper; readerKey ELcom/groupbyinc/flux/common/apache/lucene/index/IndexReader$CacheKey; leafCache ILcom/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache$LeafCache; singleton cached :Lcom/groupbyinc/flux/common/apache/lucene/search/DocIdSet; putIfAbsent ?(Lcom/groupbyinc/flux/common/apache/lucene/search/Query;Lcom/groupbyinc/flux/common/apache/lucene/index/LeafReaderContext;Lcom/groupbyinc/flux/common/apache/lucene/search/DocIdSet;Lcom/groupbyinc/flux/common/apache/lucene/index/IndexReader$CacheHelper;)V @ K
j ? 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? ? ] ? 1 - ? :(Lcom/groupbyinc/flux/common/apache/lucene/search/Query;)J B ?
? ? ?
? T(Lcom/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache;Ljava/lang/Object;)V I ?
? put ? ? ] ? 0 - ? "java/lang/invoke/LambdaMetafactory ? metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; ? ?
? ? ? H(Lcom/groupbyinc/flux/common/apache/lucene/index/IndexReader$CacheKey;)V ? clearCoreCacheKey (Ljava/lang/Object;)V ? ?
? ? onClose ?(Lcom/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache;)Lcom/groupbyinc/flux/common/apache/lucene/index/IndexReader$ClosedListener; ? ? ? addClosedListener N(Lcom/groupbyinc/flux/common/apache/lucene/index/IndexReader$ClosedListener;)V ? ? ? t(Lcom/groupbyinc/flux/common/apache/lucene/search/Query;Lcom/groupbyinc/flux/common/apache/lucene/search/DocIdSet;)V ? ?
? evictIfNecessary ? K
? unlock ? K
j ? @com/groupbyinc/flux/common/apache/lucene/index/LeafReaderContext ? java/lang/Throwable previous set ? ~
iterator ()Ljava/util/Iterator; ? java/util/Iterator
next ()Ljava/lang/Object;
remove K )java/util/ConcurrentModificationException java/lang/StringBuilder
L ?Removal from the cache failed! This is probably due to a query which has been modified after having been put into the cache or a badly implemented clone(). Query class: [ append -(Ljava/lang/String;)Ljava/lang/StringBuilder;
getClass ()Ljava/lang/Class;
-(Ljava/lang/Object;)Ljava/lang/StringBuilder;"
# ], query: [% ]' toString ()Ljava/lang/String;)*
+ (Ljava/lang/String;)V I-
.
onEviction :(Lcom/groupbyinc/flux/common/apache/lucene/search/Query;)V01
2 hasNext4 ~5 MLjava/util/Iterator; Ljava/util/Iterator; ? ]9
access$000 Z(Lcom/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache$LeafCache;)Ljava/util/Map;;<
= ] ?
access$100 L(Lcom/groupbyinc/flux/common/apache/lucene/search/LRUQueryCache$LeafCache;)J@A
B ? ?
D coreKey
clearQuery ? ?
H values ()Ljava/util/Collection;JK ]L java/util/CollectionNO1
Q clearS K ]T ?T ? K
W assertConsistent requires evictions: size=Z (I)Ljava/lang/StringBuilder;\
]
, maxSize=_ , ramBytesUsed=a (J)Ljava/lang/StringBuilder;c
d , maxRamBytesUsed=f I ?
?h java/util/Collectionsj
newSetFromMap (Ljava/util/Map;)Ljava/util/Set;lm
kn addAll (Ljava/util/Collection;)Zpq ?r removeAlltq ?u isEmptyw ~ ?x