com.google.common.cache.LocalCache$Segment.class Maven / Gradle / Ivy
???? 22
???
? ?? ?? ??
??? ??
??
??
???
? ??
?? ??
???
?
?? ??
???
? ???
? ???
?
? ??
?? ?? ??
?? L? L? ? ?
? ? L ?
? ?
?
? ?
? ?
?
?
?
? ?
?
?
A
D !"
G#
?$
?%
&' L( ?)
*+ ,-
?.
?/ ,0
?1
?2
?345 L67
Y?
?8
9
?: ;<
_?
=>? ?@BD
e?E
eF
eGH
eI
dJ
YK
?LM
oN ?OPQ
RS
YT U
?V W
?X
?Y LZ ?[
?\
?]
?^P_` ?a
Yb
?c
?d
?e
?f
g
?hi
?j
?k
?l
?m Ln4o
?p ?q
?r Ls4t4u
?v4w
?x ?y
,z { ?| ?}~
?4?
??
?? ,?4?????
??
??
??
?? ?? ??
??
??
?? ,?@
??
??
?? ,? ??
Y?
??
??
??4?
?
??
??
Y?
?
??
??
??
???? Segment InnerClasses map $Lcom/google/common/cache/LocalCache; Signature ,Lcom/google/common/cache/LocalCache; count I totalWeight RuntimeInvisibleAnnotations 'Ljavax/annotation/concurrent/GuardedBy; value Segment.this modCount threshold table 2Ljava/util/concurrent/atomic/AtomicReferenceArray; ReferenceEntry oLjava/util/concurrent/atomic/AtomicReferenceArray;>; maxSegmentWeight J keyReferenceQueue Ljava/lang/ref/ReferenceQueue; #Ljava/lang/ref/ReferenceQueue; valueReferenceQueue #Ljava/lang/ref/ReferenceQueue; recencyQueue Ljava/util/Queue; NLjava/util/Queue;>; readCount +Ljava/util/concurrent/atomic/AtomicInteger;
writeQueue accessQueue statsCounter StatsCounter 4Lcom/google/common/cache/AbstractCache$StatsCounter; ](Lcom/google/common/cache/LocalCache;IJLcom/google/common/cache/AbstractCache$StatsCounter;)V Code LineNumberTable LocalVariableTable this ,Lcom/google/common/cache/LocalCache$Segment; initialCapacity LocalVariableTypeTable 4Lcom/google/common/cache/LocalCache$Segment;
StackMapTable????? e(Lcom/google/common/cache/LocalCache;IJLcom/google/common/cache/AbstractCache$StatsCounter;)V
newEntryArray 5(I)Ljava/util/concurrent/atomic/AtomicReferenceArray; size r(I)Ljava/util/concurrent/atomic/AtomicReferenceArray;>; initTable 5(Ljava/util/concurrent/atomic/AtomicReferenceArray;)V newTable r(Ljava/util/concurrent/atomic/AtomicReferenceArray;>;)V newEntry {(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry; key Ljava/lang/Object; hash next 3Lcom/google/common/cache/LocalCache$ReferenceEntry; TK; ;Lcom/google/common/cache/LocalCache$ReferenceEntry; |(TK;ILcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry; "RuntimeVisibleParameterAnnotations Ljavax/annotation/Nullable; copyEntry ?(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry; original newNext valueReference ValueReference 3Lcom/google/common/cache/LocalCache$ValueReference; ;Lcom/google/common/cache/LocalCache$ValueReference; TV;i? ?(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry; setValue [(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V entry now previous weight E(Lcom/google/common/cache/LocalCache$ReferenceEntry;TK;TV;J)V get L(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;)Ljava/lang/Object; e cause Ljava/lang/Throwable; ee )Ljava/util/concurrent/ExecutionException; loader %Lcom/google/common/cache/CacheLoader; .Lcom/google/common/cache/CacheLoader<-TK;TV;>;'`?
Exceptions 7(TK;ILcom/google/common/cache/CacheLoader<-TK;TV;>;)TV; lockedGetOrLoad entryKey newCount index first loadingValueReference LoadingValueReference :Lcom/google/common/cache/LocalCache$LoadingValueReference; createNewEntry Z BLcom/google/common/cache/LocalCache$LoadingValueReference;7? waitForLoadingValue ?(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;)Ljava/lang/Object; ~(Lcom/google/common/cache/LocalCache$ReferenceEntry;TK;Lcom/google/common/cache/LocalCache$ValueReference;)TV; loadSync ?(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
loadingFuture 4Lcom/google/common/util/concurrent/ListenableFuture; 9Lcom/google/common/util/concurrent/ListenableFuture; y(TK;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/cache/CacheLoader<-TK;TV;>;)TV; loadAsync ?(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/cache/CacheLoader;)Lcom/google/common/util/concurrent/ListenableFuture; ?(TK;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/cache/CacheLoader<-TK;TV;>;)Lcom/google/common/util/concurrent/ListenableFuture; getAndRecordStats ?(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/util/concurrent/ListenableFuture;)Ljava/lang/Object; newValue? ?(TK;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/util/concurrent/ListenableFuture;)TV; scheduleRefresh ?(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;JLcom/google/common/cache/CacheLoader;)Ljava/lang/Object; oldValue v(Lcom/google/common/cache/LocalCache$ReferenceEntry;TK;ITV;JLcom/google/common/cache/CacheLoader<-TK;TV;>;)TV; refresh M(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;Z)Ljava/lang/Object; t checkTime result 8(TK;ILcom/google/common/cache/CacheLoader<-TK;TV;>;Z)TV; RuntimeVisibleAnnotations insertLoadingValueReference P(Ljava/lang/Object;IZ)Lcom/google/common/cache/LocalCache$LoadingValueReference; I(TK;IZ)Lcom/google/common/cache/LocalCache$LoadingValueReference; tryDrainReferenceQueues ()V drainReferenceQueues drainKeyReferenceQueue ref Ljava/lang/ref/Reference; i Ljava/lang/ref/Reference<+TK;>;? drainValueReferenceQueue Ljava/lang/ref/Reference<+TV;>; clearReferenceQueues clearKeyReferenceQueue clearValueReferenceQueue
recordRead 7(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)V ?(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)V recordLockedRead recordWrite 8(Lcom/google/common/cache/LocalCache$ReferenceEntry;IJ)V @(Lcom/google/common/cache/LocalCache$ReferenceEntry;IJ)V drainRecencyQueue tryExpireEntries (J)V
expireEntries enqueueNotification \(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/RemovalCause;)V &Lcom/google/common/cache/RemovalCause; d(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/RemovalCause;)V o(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V notification -Lcom/google/common/cache/RemovalNotification; 5Lcom/google/common/cache/RemovalNotification; h(TK;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V evictEntries getNextEvictable 5()Lcom/google/common/cache/LocalCache$ReferenceEntry; i$ Ljava/util/Iterator;? =()Lcom/google/common/cache/LocalCache$ReferenceEntry; getFirst 6(I)Lcom/google/common/cache/LocalCache$ReferenceEntry; >(I)Lcom/google/common/cache/LocalCache$ReferenceEntry; getEntry H(Ljava/lang/Object;I)Lcom/google/common/cache/LocalCache$ReferenceEntry; P(Ljava/lang/Object;I)Lcom/google/common/cache/LocalCache$ReferenceEntry; getLiveEntry I(Ljava/lang/Object;IJ)Lcom/google/common/cache/LocalCache$ReferenceEntry; Q(Ljava/lang/Object;IJ)Lcom/google/common/cache/LocalCache$ReferenceEntry; getLiveValue H(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Ljava/lang/Object; A(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)TV; '(Ljava/lang/Object;I)Ljava/lang/Object; (Ljava/lang/Object;I)TV; containsKey (Ljava/lang/Object;I)Z
containsValue (Ljava/lang/Object;)Z
entryValue length 1Lcom/google/common/annotations/VisibleForTesting; put :(Ljava/lang/Object;ILjava/lang/Object;Z)Ljava/lang/Object; onlyIfAbsent
(TK;ITV;Z)TV; expand newIndex newFirst tail tailIndex headIndex head oldIndex oldTable oldCapacity newMask replace :(Ljava/lang/Object;ILjava/lang/Object;Ljava/lang/Object;)Z
(TK;ITV;TV;)Z 9(Ljava/lang/Object;ILjava/lang/Object;)Ljava/lang/Object; (TK;ITV;)TV; remove? storeLoadedValue b(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Ljava/lang/Object;)Z oldValueReference L(TK;ILcom/google/common/cache/LocalCache$LoadingValueReference;TV;)Z ((Ljava/lang/Object;ILjava/lang/Object;)Z clear removeValueFromChain(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)Lcom/google/common/cache/LocalCache$ReferenceEntry;(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;TK;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)Lcom/google/common/cache/LocalCache$ReferenceEntry; removeEntryFromChain removeCollectedEntry 6(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V >(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V
reclaimKey 7(Lcom/google/common/cache/LocalCache$ReferenceEntry;I)Z ?(Lcom/google/common/cache/LocalCache$ReferenceEntry;I)Z reclaimValue I(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;)Z v B(TK;ILcom/google/common/cache/LocalCache$ValueReference;)Z removeLoadingValue P(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;)Z I(TK;ILcom/google/common/cache/LocalCache$LoadingValueReference;)Z removeEntry ](Lcom/google/common/cache/LocalCache$ReferenceEntry;ILcom/google/common/cache/RemovalCause;)Z e(Lcom/google/common/cache/LocalCache$ReferenceEntry;ILcom/google/common/cache/RemovalCause;)Z postReadCleanup preWriteCleanup postWriteCleanup cleanUp runLockedCleanup runUnlockedCleanup TLjava/util/concurrent/locks/ReentrantLock;
SourceFile LocalCache.java ?b )java/util/concurrent/atomic/AtomicInteger ? ? ? ? ? ????? 2com/google/common/cache/AbstractCache$StatsCounter ? ? ? ???? java/lang/ref/ReferenceQueue ? ??? ? ??? *java/util/concurrent/ConcurrentLinkedQueue?? ? ??? -com/google/common/cache/LocalCache$WriteQueue
WriteQueue ? ? .com/google/common/cache/LocalCache$AccessQueue AccessQueue ? ? 0java/util/concurrent/atomic/AtomicReferenceArray ???? ? ??? ? ?????????%????????????? Weights must be non-negative???????st?? ? ??????????op??ST?b??BC5& 'java/util/concurrent/ExecutionException?? java/lang/Error 0com/google/common/util/concurrent/ExecutionError ?? java/lang/RuntimeException =com/google/common/util/concurrent/UncheckedExecutionException ???b?x%? 1com/google/common/cache/LocalCache$ReferenceEntry?????????|z~???|rp?b?b????? 8com/google/common/cache/LocalCache$LoadingValueReference??EF?? java/lang/AssertionError??? Recursive load??? =com/google/common/cache/CacheLoader$InvalidCacheLoadException InvalidCacheLoadException java/lang/StringBuilder "CacheLoader returned null for key ???? .?? ? NO ,com/google/common/cache/LocalCache$Segment$1 ??
?x??
x???? ?WX^_KL? java/lang/Throwable ? ? ???cbdbjb?? 1com/google/common/cache/LocalCache$ValueReference??mbnb?x?vb ? ??x??yx?????b ? ? +com/google/common/cache/RemovalNotification ?!"?#???$|%&?'????abwx??(-)??b?b*|????+|, ?com/google/common/cache/LocalCache$WeightedStrongValueReference WeightedStrongValueReference ?-z{lb?b???.?/?0??b?x?b1b *com/google/common/cache/LocalCache$Segment (java/util/concurrent/locks/ReentrantLock "com/google/common/cache/LocalCache java/util/Queue java/lang/Object #com/google/common/cache/CacheLoader 2com/google/common/util/concurrent/ListenableFuture java/lang/ref/Reference java/util/Iterator $com/google/common/cache/RemovalCause $com/google/common/base/Preconditions checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object; %com/google/common/cache/AbstractCache usesKeyReferences ()Z usesValueReferences usesAccessQueue discardingQueue ()Ljava/util/Queue; usesWriteQueue (I)V ()I
customWeigher entryFactory EntryFactory 1Lcom/google/common/cache/LocalCache$EntryFactory; /com/google/common/cache/LocalCache$EntryFactory ?(Lcom/google/common/cache/LocalCache$Segment;Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry; getKey ()Ljava/lang/Object; getValueReference 5()Lcom/google/common/cache/LocalCache$ValueReference; isActive ?(Lcom/google/common/cache/LocalCache$Segment;Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry; copyFor ?(Ljava/lang/ref/ReferenceQueue;Ljava/lang/Object;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ValueReference; setValueReference 6(Lcom/google/common/cache/LocalCache$ValueReference;)V weigher !Lcom/google/common/cache/Weigher; com/google/common/cache/Weigher weigh '(Ljava/lang/Object;Ljava/lang/Object;)I
checkState (ZLjava/lang/Object;)V
valueStrength Strength -Lcom/google/common/cache/LocalCache$Strength; +com/google/common/cache/LocalCache$Strength referenceValue ?(Lcom/google/common/cache/LocalCache$Segment;Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;I)Lcom/google/common/cache/LocalCache$ValueReference; notifyNewValue (Ljava/lang/Object;)V ticker Lcom/google/common/base/Ticker; com/google/common/base/Ticker read ()J
recordHits isLoading getCause ()Ljava/lang/Throwable; (Ljava/lang/Error;)V (Ljava/lang/Throwable;)V lock (I)Ljava/lang/Object; getHash keyEquivalence $Lcom/google/common/base/Equivalence; "com/google/common/base/Equivalence
equivalent '(Ljava/lang/Object;Ljava/lang/Object;)Z COLLECTED isExpired 7(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Z EXPIRED unlock getNext set (ILjava/lang/Object;)V recordMisses java/lang/Thread holdsLock waitForValue append -(Ljava/lang/String;)Ljava/lang/StringBuilder; -(Ljava/lang/Object;)Ljava/lang/StringBuilder; toString ()Ljava/lang/String; (Ljava/lang/String;)V
loadFuture m(Ljava/lang/Object;Lcom/google/common/cache/CacheLoader;)Lcom/google/common/util/concurrent/ListenableFuture; ?(Lcom/google/common/cache/LocalCache$Segment;Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/util/concurrent/ListenableFuture;)V sameThreadExecutor