com.groupbyinc.flux.common.cache.Cache.class Maven / Gradle / Ivy
???? 4m &com/groupbyinc/flux/common/cache/Cache <Ljava/lang/Object; java/lang/Object
Cache.java (com/groupbyinc/flux/common/cache/Cache$3 1com/groupbyinc/flux/common/cache/Cache$CacheStats
CacheStats 4com/groupbyinc/flux/common/cache/Cache$CacheIterator
CacheIterator 3com/groupbyinc/flux/common/cache/Cache$CacheSegment CacheSegment ,com/groupbyinc/flux/common/cache/Cache$Entry Entry ,com/groupbyinc/flux/common/cache/Cache$State State (com/groupbyinc/flux/common/cache/Cache$1 (com/groupbyinc/flux/common/cache/Cache$2 Bcom/groupbyinc/flux/common/cache/RemovalNotification$RemovalReason 4com/groupbyinc/flux/common/cache/RemovalNotification
RemovalReason @com/groupbyinc/flux/common/cache/Cache$CacheSegment$SegmentStats ! SegmentStats %java/lang/invoke/MethodHandles$Lookup $ java/lang/invoke/MethodHandles & Lookup expireAfterAccessNanos J entriesExpireAfterAccess Z expireAfterWriteNanos entriesExpireAfterWrite count I weight
maximumWeight weigher %Ljava/util/function/ToLongBiFunction; -Ljava/util/function/ToLongBiFunction; removalListener 2Lcom/groupbyinc/flux/common/cache/RemovalListener; :Lcom/groupbyinc/flux/common/cache/RemovalListener; NUMBER_OF_SEGMENTS segments 6[Lcom/groupbyinc/flux/common/cache/Cache$CacheSegment; >[Lcom/groupbyinc/flux/common/cache/Cache$CacheSegment; head .Lcom/groupbyinc/flux/common/cache/Cache$Entry; 6Lcom/groupbyinc/flux/common/cache/Cache$Entry; tail lruLock ;Lcom/groupbyinc/flux/common/util/concurrent/ReleasableLock; $assertionsDisabled ()V E F
G???????? ) * K - * M / 0 O 1 * Q 2 * S "java/lang/invoke/LambdaMetafactory U 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; W X
V Y Z '(Ljava/lang/Object;Ljava/lang/Object;)J \ lambda$new$0 ^ \
_ ` applyAsLong '()Ljava/util/function/ToLongBiFunction; b c d 3 4 f 9(Lcom/groupbyinc/flux/common/cache/RemovalNotification;)V h lambda$new$1 j h
k l onRemoval 4()Lcom/groupbyinc/flux/common/cache/RemovalListener; n o p 6 7 r ; < t -(Lcom/groupbyinc/flux/common/cache/Cache$1;)V E v
w 9com/groupbyinc/flux/common/util/concurrent/ReleasableLock y (java/util/concurrent/locks/ReentrantLock {
| G $(Ljava/util/concurrent/locks/Lock;)V E ~
z B C ? i this 0Lcom/groupbyinc/flux/common/cache/Cache; (Lcom/groupbyinc/flux/common/cache/Cache; setExpireAfterAccessNanos (J)V "java/lang/IllegalArgumentException ? expireAfterAccessNanos <= 0 ? (Ljava/lang/String;)V E ?
? ? + , ? getExpireAfterAccessNanos ()J setExpireAfterWriteNanos expireAfterWriteNanos <= 0 ? . , ? getExpireAfterWriteNanos setMaximumWeight maximumWeight < 0 ?
setWeigher ((Ljava/util/function/ToLongBiFunction;)V java/util/Objects ? requireNonNull &(Ljava/lang/Object;)Ljava/lang/Object; ? ?
? ? setRemovalListener 5(Lcom/groupbyinc/flux/common/cache/RemovalListener;)V now java/lang/System ? nanoTime ? ?
? ? get ? ?
? (Ljava/lang/Object;)V ? lambda$get$2 1(Lcom/groupbyinc/flux/common/cache/Cache$Entry;)V ? ?
? ? ? accept ()Ljava/util/function/Consumer; ? ? ? D(Ljava/lang/Object;JLjava/util/function/Consumer;)Ljava/lang/Object; ? ?
? key TK; Ljava/lang/Object; getCacheSegment I(Ljava/lang/Object;)Lcom/groupbyinc/flux/common/cache/Cache$CacheSegment; ? ?
? (Ljava/lang/Object;)Z ? lambda$get$3 2(JLcom/groupbyinc/flux/common/cache/Cache$Entry;)Z ? ?
? ? 1(Lcom/groupbyinc/flux/common/cache/Cache$Entry;)Z ? test I(Lcom/groupbyinc/flux/common/cache/Cache;J)Ljava/util/function/Predicate; ? ? ? ~(Ljava/lang/Object;JLjava/util/function/Predicate;Ljava/util/function/Consumer;)Lcom/groupbyinc/flux/common/cache/Cache$Entry; ? ?
? promote 2(Lcom/groupbyinc/flux/common/cache/Cache$Entry;J)Z ? ?
? value ? ? ? onExpiration ULjava/util/function/Consumer;>; Ljava/util/function/Consumer; segment =Lcom/groupbyinc/flux/common/cache/Cache$CacheSegment; 5Lcom/groupbyinc/flux/common/cache/Cache$CacheSegment; entry computeIfAbsent T(Ljava/lang/Object;Lcom/groupbyinc/flux/common/cache/CacheLoader;)Ljava/lang/Object; 'java/util/concurrent/ExecutionException ? java/lang/Throwable ? java/lang/Exception ? java/lang/InterruptedException ? lambda$computeIfAbsent$4 ? ?
? ? G(Lcom/groupbyinc/flux/common/cache/Cache;)Ljava/util/function/Consumer; ? ? ? &java/util/concurrent/CompletableFuture ?
? G writeLock ? C ? acquire =()Lcom/groupbyinc/flux/common/util/concurrent/ReleasableLock; ? ?
z ? map Ljava/util/Map; ?
java/util/Map putIfAbsent 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; close F
z
,com/groupbyinc/flux/common/cache/CacheLoader
addSuppressed (Ljava/lang/Throwable;)V
? lambda$computeIfAbsent$5 ?(JLcom/groupbyinc/flux/common/cache/Cache$CacheSegment;Ljava/lang/Object;Lcom/groupbyinc/flux/common/cache/Cache$Entry;Ljava/lang/Throwable;)Ljava/lang/Object;
W(Lcom/groupbyinc/flux/common/cache/Cache$Entry;Ljava/lang/Throwable;)Ljava/lang/Object; apply ?(Lcom/groupbyinc/flux/common/cache/Cache;JLcom/groupbyinc/flux/common/cache/Cache$CacheSegment;Ljava/lang/Object;)Ljava/util/function/BiFunction; handle I(Ljava/util/function/BiFunction;)Ljava/util/concurrent/CompletableFuture;
? load" ?
# java/util/function/BiFunction% completeExceptionally (Ljava/lang/Throwable;)Z'(
?) E
?+ java/lang/NullPointerException- loader returned a null value/
. ? ((Ljava/lang/Object;Ljava/lang/Object;J)V E2
3 complete5 ?
?6 ()Ljava/lang/Object; ?8
?9 isCompletedExceptionally ()Z;<
?= java/lang/IllegalStateException? Bthe future was completed exceptionally but no exception was thrownA
@ ?
@+ future `Ljava/util/concurrent/CompletableFuture;>; (Ljava/util/concurrent/CompletableFuture; ignored loaded TV; e Ljava/lang/Exception; npe Ljava/lang/NullPointerException; completableValue -Ljava/util/concurrent/CompletableFuture; Ljava/lang/InterruptedException; completableFuture handler qLjava/util/function/BiFunction<-Lcom/groupbyinc/flux/common/cache/Cache$Entry;Ljava/lang/Throwable;+TV;>; Ljava/util/function/BiFunction; loader 6Lcom/groupbyinc/flux/common/cache/CacheLoader; .Lcom/groupbyinc/flux/common/cache/CacheLoader; put '(Ljava/lang/Object;Ljava/lang/Object;)VY2
[ Q(Ljava/lang/Object;Ljava/lang/Object;J)Lcom/groupbyinc/flux/common/collect/Tuple;Y]
^ (com/groupbyinc/flux/common/collect/Tuple` v2b8
ac state .Lcom/groupbyinc/flux/common/cache/Cache$State;ef g EXISTINGif j unlinkl ?
m v1o8
ap ? ? r REPLACED DLcom/groupbyinc/flux/common/cache/RemovalNotification$RemovalReason;tu v k(Ljava/lang/Object;Ljava/lang/Object;Lcom/groupbyinc/flux/common/cache/RemovalNotification$RemovalReason;)V Ex
y 0com/groupbyinc/flux/common/cache/RemovalListener{ n h|} tuple ?Lcom/groupbyinc/flux/common/collect/Tuple;Lcom/groupbyinc/flux/common/cache/Cache$Entry;>; *Lcom/groupbyinc/flux/common/collect/Tuple; replaced
invalidate remove B(Ljava/lang/Object;)Lcom/groupbyinc/flux/common/cache/Cache$Entry;??
? INVALIDATED?u ? delete u(Lcom/groupbyinc/flux/common/cache/Cache$Entry;Lcom/groupbyinc/flux/common/cache/RemovalNotification$RemovalReason;)V??
?
invalidateAll [Z? segmentLock *Ljava/util/concurrent/locks/ReadWriteLock;?? ? (java/util/concurrent/locks/ReadWriteLock? #()Ljava/util/concurrent/locks/Lock; ???? java/util/concurrent/locks/Lock? lock? F?? > ? ? java/util/Arrays? stream .([Ljava/lang/Object;)Ljava/util/stream/Stream;??
?? lambda$invalidateAll$6 8(Lcom/groupbyinc/flux/common/cache/Cache$CacheSegment;)V??
??? ? java/util/stream/Stream? forEach (Ljava/util/function/Consumer;)V???? DELETED?f ? after? ? ? A ? ? unlock? F?? current h haveSegmentLock refresh evict? ?
? ()I keys ()Ljava/lang/Iterable; ()Ljava/util/Iterator;?
lambda$keys$7??
?? iterator >(Lcom/groupbyinc/flux/common/cache/Cache;)Ljava/lang/Iterable;?? ? values lambda$values$8??
?? ? stats 5()Lcom/groupbyinc/flux/common/cache/Cache$CacheStats; segmentStats BLcom/groupbyinc/flux/common/cache/Cache$CacheSegment$SegmentStats;?? ?
access$500 k(Lcom/groupbyinc/flux/common/cache/Cache$CacheSegment$SegmentStats;)Ljava/util/concurrent/atomic/LongAdder;??
"? %java/util/concurrent/atomic/LongAdder? longValue? ?
??
access$600??
"?
access$700??
"? (JJJ)V E?
? hits misses evictions 5$SwitchMap$org$elasticsearch$common$cache$Cache$State [I?? ? ordinal??
? relinkAtHead? ?
?
linkAtHead? ?
promoted D , isHeldByCurrentThread ()Ljava/lang/Boolean;
z java/lang/Boolean booleanValue<
java/lang/AssertionError
G shouldPrune ?
evictEntry ?
EVICTEDu
removalReason
exceedsWeight<
isExpired ?
accessTime! * " writeTime$ * % before' ? ( #java/util/function/ToLongBiFunction* b \+, hashCode.?
/ +(Lcom/groupbyinc/flux/common/cache/Cache;)V E1
2
2 java/util/HashMap5
6 G ? ?8? ?: sanity ok ex Ljava/lang/Throwable; notification 6Lcom/groupbyinc/flux/common/cache/RemovalNotification; k v
access$200 q(Lcom/groupbyinc/flux/common/cache/Cache;Ljava/lang/Object;)Lcom/groupbyinc/flux/common/cache/Cache$CacheSegment; x0 x1
access$300 e(Lcom/groupbyinc/flux/common/cache/Cache;)Lcom/groupbyinc/flux/common/util/concurrent/ReleasableLock;
access$400 ?(Lcom/groupbyinc/flux/common/cache/Cache;Lcom/groupbyinc/flux/common/cache/Cache$Entry;Lcom/groupbyinc/flux/common/cache/RemovalNotification$RemovalReason;)V x2 java/lang/ClassN desiredAssertionStatusP<
OQ Signature
ConstantValue Code LocalVariableTable LocalVariableTypeTable LineNumberTable
StackMapTable 0(Ljava/util/function/ToLongBiFunction;)V =(Lcom/groupbyinc/flux/common/cache/RemovalListener;)V (TK;)TV; ^(TK;JLjava/util/function/Consumer;>;)TV;
Exceptions >(TK;Lcom/groupbyinc/flux/common/cache/CacheLoader;)TV; (TK;TV;)V
(TK;TV;J)V (TK;)V ()Ljava/lang/Iterable; ()Ljava/lang/Iterable; :(Lcom/groupbyinc/flux/common/cache/Cache$Entry;J)Z 9(Lcom/groupbyinc/flux/common/cache/Cache$Entry;)V }(Lcom/groupbyinc/flux/common/cache/Cache$Entry;Lcom/groupbyinc/flux/common/cache/RemovalNotification$RemovalReason;)V 9(Lcom/groupbyinc/flux/common/cache/Cache$Entry;)Z B(TK;)Lcom/groupbyinc/flux/common/cache/Cache$CacheSegment; BootstrapMethods
SourceFile InnerClasses ! ) * + , - * . , / 0 1 * 2 * 3 4 S 5 6 7 S 8 9 0 T : ; <