.class Lcom/google/common/cache/LocalCache; .super Ljava/util/AbstractMap; .source "LocalCache.java" # interfaces .implements Ljava/util/concurrent/ConcurrentMap; # annotations .annotation build Lcom/google/common/annotations/GwtCompatible; emulated = true .end annotation .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/google/common/cache/LocalCache$LocalLoadingCache;, Lcom/google/common/cache/LocalCache$LocalManualCache;, Lcom/google/common/cache/LocalCache$LoadingSerializationProxy;, Lcom/google/common/cache/LocalCache$ManualSerializationProxy;, Lcom/google/common/cache/LocalCache$EntrySet;, Lcom/google/common/cache/LocalCache$Values;, Lcom/google/common/cache/LocalCache$KeySet;, Lcom/google/common/cache/LocalCache$AbstractCacheSet;, Lcom/google/common/cache/LocalCache$EntryIterator;, Lcom/google/common/cache/LocalCache$WriteThroughEntry;, Lcom/google/common/cache/LocalCache$ValueIterator;, Lcom/google/common/cache/LocalCache$KeyIterator;, Lcom/google/common/cache/LocalCache$HashIterator;, Lcom/google/common/cache/LocalCache$AccessQueue;, Lcom/google/common/cache/LocalCache$WriteQueue;, Lcom/google/common/cache/LocalCache$LoadingValueReference;, Lcom/google/common/cache/LocalCache$Segment;, Lcom/google/common/cache/LocalCache$WeightedStrongValueReference;, Lcom/google/common/cache/LocalCache$WeightedSoftValueReference;, Lcom/google/common/cache/LocalCache$WeightedWeakValueReference;, Lcom/google/common/cache/LocalCache$StrongValueReference;, Lcom/google/common/cache/LocalCache$SoftValueReference;, Lcom/google/common/cache/LocalCache$WeakValueReference;, Lcom/google/common/cache/LocalCache$WeakAccessWriteEntry;, Lcom/google/common/cache/LocalCache$WeakWriteEntry;, Lcom/google/common/cache/LocalCache$WeakAccessEntry;, Lcom/google/common/cache/LocalCache$WeakEntry;, Lcom/google/common/cache/LocalCache$StrongAccessWriteEntry;, Lcom/google/common/cache/LocalCache$StrongWriteEntry;, Lcom/google/common/cache/LocalCache$StrongAccessEntry;, Lcom/google/common/cache/LocalCache$StrongEntry;, Lcom/google/common/cache/LocalCache$AbstractReferenceEntry;, Lcom/google/common/cache/LocalCache$NullEntry;, Lcom/google/common/cache/LocalCache$ReferenceEntry;, Lcom/google/common/cache/LocalCache$ValueReference;, Lcom/google/common/cache/LocalCache$EntryFactory;, Lcom/google/common/cache/LocalCache$Strength; } .end annotation .annotation system Ldalvik/annotation/Signature; value = { "", "Ljava/util/AbstractMap", ";", "Ljava/util/concurrent/ConcurrentMap", ";" } .end annotation # static fields .field static final CONTAINS_VALUE_RETRIES:I = 0x3 .field static final DISCARDING_QUEUE:Ljava/util/Queue; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/Queue", "<+", "Ljava/lang/Object;", ">;" } .end annotation .end field .field static final DRAIN_MAX:I = 0x10 .field static final DRAIN_THRESHOLD:I = 0x3f .field static final MAXIMUM_CAPACITY:I = 0x40000000 .field static final MAX_SEGMENTS:I = 0x10000 .field static final UNSET:Lcom/google/common/cache/LocalCache$ValueReference; .annotation system Ldalvik/annotation/Signature; value = { "Lcom/google/common/cache/LocalCache$ValueReference", "<", "Ljava/lang/Object;", "Ljava/lang/Object;", ">;" } .end annotation .end field .field static final logger:Ljava/util/logging/Logger; .field static final sameThreadExecutor:Lcom/google/common/util/concurrent/ListeningExecutorService; # instance fields .field final concurrencyLevel:I .field final defaultLoader:Lcom/google/common/cache/CacheLoader; .annotation system Ldalvik/annotation/Signature; value = { "Lcom/google/common/cache/CacheLoader", "<-TK;TV;>;" } .end annotation .annotation runtime Ljavax/annotation/Nullable; .end annotation .end field .field final entryFactory:Lcom/google/common/cache/LocalCache$EntryFactory; .field entrySet:Ljava/util/Set; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/Set", "<", "Ljava/util/Map$Entry", ";>;" } .end annotation .end field .field final expireAfterAccessNanos:J .field final expireAfterWriteNanos:J .field final globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; .field final keyEquivalence:Lcom/google/common/base/Equivalence; .annotation system Ldalvik/annotation/Signature; value = { "Lcom/google/common/base/Equivalence", "<", "Ljava/lang/Object;", ">;" } .end annotation .end field .field keySet:Ljava/util/Set; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/Set", ";" } .end annotation .end field .field final keyStrength:Lcom/google/common/cache/LocalCache$Strength; .field final maxWeight:J .field final refreshNanos:J .field final removalListener:Lcom/google/common/cache/RemovalListener; .annotation system Ldalvik/annotation/Signature; value = { "Lcom/google/common/cache/RemovalListener", ";" } .end annotation .end field .field final removalNotificationQueue:Ljava/util/Queue; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/Queue", "<", "Lcom/google/common/cache/RemovalNotification", ";>;" } .end annotation .end field .field final segmentMask:I .field final segmentShift:I .field final segments:[Lcom/google/common/cache/LocalCache$Segment; .annotation system Ldalvik/annotation/Signature; value = { "[", "Lcom/google/common/cache/LocalCache$Segment", ";" } .end annotation .end field .field final ticker:Lcom/google/common/base/Ticker; .field final valueEquivalence:Lcom/google/common/base/Equivalence; .annotation system Ldalvik/annotation/Signature; value = { "Lcom/google/common/base/Equivalence", "<", "Ljava/lang/Object;", ">;" } .end annotation .end field .field final valueStrength:Lcom/google/common/cache/LocalCache$Strength; .field values:Ljava/util/Collection; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/Collection", ";" } .end annotation .end field .field final weigher:Lcom/google/common/cache/Weigher; .annotation system Ldalvik/annotation/Signature; value = { "Lcom/google/common/cache/Weigher", ";" } .end annotation .end field # direct methods .method static constructor ()V .locals 1 .prologue .line 158 const-class v0, Lcom/google/common/cache/LocalCache; invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String; move-result-object v0 invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger; move-result-object v0 sput-object v0, Lcom/google/common/cache/LocalCache;->logger:Ljava/util/logging/Logger; .line 160 invoke-static {}, Lcom/google/common/util/concurrent/MoreExecutors;->sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService; move-result-object v0 sput-object v0, Lcom/google/common/cache/LocalCache;->sameThreadExecutor:Lcom/google/common/util/concurrent/ListeningExecutorService; .line 690 new-instance v0, Lcom/google/common/cache/LocalCache$1; invoke-direct {v0}, Lcom/google/common/cache/LocalCache$1;->()V sput-object v0, Lcom/google/common/cache/LocalCache;->UNSET:Lcom/google/common/cache/LocalCache$ValueReference; .line 1021 new-instance v0, Lcom/google/common/cache/LocalCache$2; invoke-direct {v0}, Lcom/google/common/cache/LocalCache$2;->()V sput-object v0, Lcom/google/common/cache/LocalCache;->DISCARDING_QUEUE:Ljava/util/Queue; return-void .end method .method constructor (Lcom/google/common/cache/CacheBuilder;Lcom/google/common/cache/CacheLoader;)V .locals 12 .param p2 # Lcom/google/common/cache/CacheLoader; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/CacheBuilder", "<-TK;-TV;>;", "Lcom/google/common/cache/CacheLoader", "<-TK;TV;>;)V" } .end annotation .prologue const-wide/16 v10, 0x1 const/4 v2, 0x1 const/4 v4, 0x0 .line 239 invoke-direct {p0}, Ljava/util/AbstractMap;->()V .line 240 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getConcurrencyLevel()I move-result v0 const/high16 v1, 0x10000 invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I move-result v0 iput v0, p0, Lcom/google/common/cache/LocalCache;->concurrencyLevel:I .line 242 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getKeyStrength()Lcom/google/common/cache/LocalCache$Strength; move-result-object v0 iput-object v0, p0, Lcom/google/common/cache/LocalCache;->keyStrength:Lcom/google/common/cache/LocalCache$Strength; .line 243 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getValueStrength()Lcom/google/common/cache/LocalCache$Strength; move-result-object v0 iput-object v0, p0, Lcom/google/common/cache/LocalCache;->valueStrength:Lcom/google/common/cache/LocalCache$Strength; .line 245 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getKeyEquivalence()Lcom/google/common/base/Equivalence; move-result-object v0 iput-object v0, p0, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence; .line 246 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getValueEquivalence()Lcom/google/common/base/Equivalence; move-result-object v0 iput-object v0, p0, Lcom/google/common/cache/LocalCache;->valueEquivalence:Lcom/google/common/base/Equivalence; .line 248 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getMaximumWeight()J move-result-wide v0 iput-wide v0, p0, Lcom/google/common/cache/LocalCache;->maxWeight:J .line 249 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getWeigher()Lcom/google/common/cache/Weigher; move-result-object v0 iput-object v0, p0, Lcom/google/common/cache/LocalCache;->weigher:Lcom/google/common/cache/Weigher; .line 250 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getExpireAfterAccessNanos()J move-result-wide v0 iput-wide v0, p0, Lcom/google/common/cache/LocalCache;->expireAfterAccessNanos:J .line 251 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getExpireAfterWriteNanos()J move-result-wide v0 iput-wide v0, p0, Lcom/google/common/cache/LocalCache;->expireAfterWriteNanos:J .line 252 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getRefreshNanos()J move-result-wide v0 iput-wide v0, p0, Lcom/google/common/cache/LocalCache;->refreshNanos:J .line 254 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getRemovalListener()Lcom/google/common/cache/RemovalListener; move-result-object v0 iput-object v0, p0, Lcom/google/common/cache/LocalCache;->removalListener:Lcom/google/common/cache/RemovalListener; .line 255 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->removalListener:Lcom/google/common/cache/RemovalListener; sget-object v1, Lcom/google/common/cache/CacheBuilder$NullListener;->INSTANCE:Lcom/google/common/cache/CacheBuilder$NullListener; if-ne v0, v1, :cond_2 invoke-static {}, Lcom/google/common/cache/LocalCache;->discardingQueue()Ljava/util/Queue; move-result-object v0 :goto_0 iput-object v0, p0, Lcom/google/common/cache/LocalCache;->removalNotificationQueue:Ljava/util/Queue; .line 259 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->recordsTime()Z move-result v0 invoke-virtual {p1, v0}, Lcom/google/common/cache/CacheBuilder;->getTicker(Z)Lcom/google/common/base/Ticker; move-result-object v0 iput-object v0, p0, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker; .line 260 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->keyStrength:Lcom/google/common/cache/LocalCache$Strength; invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->usesAccessEntries()Z move-result v1 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->usesWriteEntries()Z move-result v3 invoke-static {v0, v1, v3}, Lcom/google/common/cache/LocalCache$EntryFactory;->getFactory(Lcom/google/common/cache/LocalCache$Strength;ZZ)Lcom/google/common/cache/LocalCache$EntryFactory; move-result-object v0 iput-object v0, p0, Lcom/google/common/cache/LocalCache;->entryFactory:Lcom/google/common/cache/LocalCache$EntryFactory; .line 261 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getStatsCounterSupplier()Lcom/google/common/base/Supplier; move-result-object v0 invoke-interface {v0}, Lcom/google/common/base/Supplier;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/google/common/cache/AbstractCache$StatsCounter; iput-object v0, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; .line 262 iput-object p2, p0, Lcom/google/common/cache/LocalCache;->defaultLoader:Lcom/google/common/cache/CacheLoader; .line 264 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getInitialCapacity()I move-result v0 const/high16 v1, 0x40000000 # 2.0f invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I move-result v0 .line 265 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->evictsBySize()Z move-result v1 if-eqz v1, :cond_0 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->customWeigher()Z move-result v1 if-nez v1, :cond_0 .line 266 iget-wide v6, p0, Lcom/google/common/cache/LocalCache;->maxWeight:J long-to-int v1, v6 invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I move-result v0 :cond_0 move v1, v2 move v3, v4 .line 277 :goto_1 iget v5, p0, Lcom/google/common/cache/LocalCache;->concurrencyLevel:I if-ge v1, v5, :cond_3 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->evictsBySize()Z move-result v5 if-eqz v5, :cond_1 mul-int/lit8 v5, v1, 0x14 int-to-long v6, v5 iget-wide v8, p0, Lcom/google/common/cache/LocalCache;->maxWeight:J cmp-long v5, v6, v8 if-gtz v5, :cond_3 .line 278 :cond_1 add-int/lit8 v3, v3, 0x1 .line 279 shl-int/lit8 v1, v1, 0x1 goto :goto_1 .line 255 :cond_2 new-instance v0, Ljava/util/concurrent/ConcurrentLinkedQueue; invoke-direct {v0}, Ljava/util/concurrent/ConcurrentLinkedQueue;->()V goto :goto_0 .line 281 :cond_3 rsub-int/lit8 v3, v3, 0x20 iput v3, p0, Lcom/google/common/cache/LocalCache;->segmentShift:I .line 282 add-int/lit8 v3, v1, -0x1 iput v3, p0, Lcom/google/common/cache/LocalCache;->segmentMask:I .line 284 invoke-virtual {p0, v1}, Lcom/google/common/cache/LocalCache;->newSegmentArray(I)[Lcom/google/common/cache/LocalCache$Segment; move-result-object v3 iput-object v3, p0, Lcom/google/common/cache/LocalCache;->segments:[Lcom/google/common/cache/LocalCache$Segment; .line 286 div-int v3, v0, v1 .line 287 mul-int v5, v3, v1 if-ge v5, v0, :cond_8 .line 288 add-int/lit8 v0, v3, 0x1 :goto_2 move v5, v2 .line 292 :goto_3 if-ge v5, v0, :cond_4 .line 293 shl-int/lit8 v2, v5, 0x1 move v5, v2 goto :goto_3 .line 296 :cond_4 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->evictsBySize()Z move-result v0 if-eqz v0, :cond_5 .line 298 iget-wide v2, p0, Lcom/google/common/cache/LocalCache;->maxWeight:J int-to-long v6, v1 div-long/2addr v2, v6 add-long/2addr v2, v10 .line 299 iget-wide v6, p0, Lcom/google/common/cache/LocalCache;->maxWeight:J int-to-long v0, v1 rem-long/2addr v6, v0 move-wide v0, v2 .line 300 :goto_4 iget-object v2, p0, Lcom/google/common/cache/LocalCache;->segments:[Lcom/google/common/cache/LocalCache$Segment; array-length v2, v2 if-ge v4, v2, :cond_6 .line 301 int-to-long v2, v4 cmp-long v2, v2, v6 if-nez v2, :cond_7 .line 302 sub-long v2, v0, v10 .line 304 :goto_5 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->segments:[Lcom/google/common/cache/LocalCache$Segment; invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getStatsCounterSupplier()Lcom/google/common/base/Supplier; move-result-object v0 invoke-interface {v0}, Lcom/google/common/base/Supplier;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/google/common/cache/AbstractCache$StatsCounter; invoke-virtual {p0, v5, v2, v3, v0}, Lcom/google/common/cache/LocalCache;->createSegment(IJLcom/google/common/cache/AbstractCache$StatsCounter;)Lcom/google/common/cache/LocalCache$Segment; move-result-object v0 aput-object v0, v1, v4 .line 300 add-int/lit8 v4, v4, 0x1 move-wide v0, v2 goto :goto_4 .line 308 :cond_5 :goto_6 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->segments:[Lcom/google/common/cache/LocalCache$Segment; array-length v0, v0 if-ge v4, v0, :cond_6 .line 309 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->segments:[Lcom/google/common/cache/LocalCache$Segment; const-wide/16 v2, -0x1 invoke-virtual {p1}, Lcom/google/common/cache/CacheBuilder;->getStatsCounterSupplier()Lcom/google/common/base/Supplier; move-result-object v0 invoke-interface {v0}, Lcom/google/common/base/Supplier;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/google/common/cache/AbstractCache$StatsCounter; invoke-virtual {p0, v5, v2, v3, v0}, Lcom/google/common/cache/LocalCache;->createSegment(IJLcom/google/common/cache/AbstractCache$StatsCounter;)Lcom/google/common/cache/LocalCache$Segment; move-result-object v0 aput-object v0, v1, v4 .line 308 add-int/lit8 v4, v4, 0x1 goto :goto_6 .line 313 :cond_6 return-void :cond_7 move-wide v2, v0 goto :goto_5 :cond_8 move v0, v3 goto :goto_2 .end method .method static connectAccessOrder(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";)V" } .end annotation .annotation build Ljavax/annotation/concurrent/GuardedBy; value = "Segment.this" .end annotation .prologue .line 1921 invoke-interface {p0, p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setNextInAccessQueue(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .line 1922 invoke-interface {p1, p0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setPreviousInAccessQueue(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .line 1923 return-void .end method .method static connectWriteOrder(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";)V" } .end annotation .annotation build Ljavax/annotation/concurrent/GuardedBy; value = "Segment.this" .end annotation .prologue .line 1934 invoke-interface {p0, p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setNextInWriteQueue(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .line 1935 invoke-interface {p1, p0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setPreviousInWriteQueue(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .line 1936 return-void .end method .method static discardingQueue()Ljava/util/Queue; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/Queue", ";" } .end annotation .prologue .line 1053 sget-object v0, Lcom/google/common/cache/LocalCache;->DISCARDING_QUEUE:Ljava/util/Queue; return-object v0 .end method .method static nullEntry()Lcom/google/common/cache/LocalCache$ReferenceEntry; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";" } .end annotation .prologue .line 1018 sget-object v0, Lcom/google/common/cache/LocalCache$NullEntry;->INSTANCE:Lcom/google/common/cache/LocalCache$NullEntry; return-object v0 .end method .method static nullifyAccessOrder(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";)V" } .end annotation .annotation build Ljavax/annotation/concurrent/GuardedBy; value = "Segment.this" .end annotation .prologue .line 1927 invoke-static {}, Lcom/google/common/cache/LocalCache;->nullEntry()Lcom/google/common/cache/LocalCache$ReferenceEntry; move-result-object v0 .line 1928 invoke-interface {p0, v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setNextInAccessQueue(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .line 1929 invoke-interface {p0, v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setPreviousInAccessQueue(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .line 1930 return-void .end method .method static nullifyWriteOrder(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";)V" } .end annotation .annotation build Ljavax/annotation/concurrent/GuardedBy; value = "Segment.this" .end annotation .prologue .line 1940 invoke-static {}, Lcom/google/common/cache/LocalCache;->nullEntry()Lcom/google/common/cache/LocalCache$ReferenceEntry; move-result-object v0 .line 1941 invoke-interface {p0, v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setNextInWriteQueue(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .line 1942 invoke-interface {p0, v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setPreviousInWriteQueue(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .line 1943 return-void .end method .method static rehash(I)I .locals 3 .prologue .line 1799 shl-int/lit8 v0, p0, 0xf xor-int/lit16 v0, v0, -0x3283 add-int/2addr v0, p0 .line 1800 ushr-int/lit8 v1, v0, 0xa xor-int/2addr v0, v1 .line 1801 shl-int/lit8 v1, v0, 0x3 add-int/2addr v0, v1 .line 1802 ushr-int/lit8 v1, v0, 0x6 xor-int/2addr v0, v1 .line 1803 shl-int/lit8 v1, v0, 0x2 shl-int/lit8 v2, v0, 0xe add-int/2addr v1, v2 add-int/2addr v0, v1 .line 1804 ushr-int/lit8 v1, v0, 0x10 xor-int/2addr v0, v1 return v0 .end method .method static unset()Lcom/google/common/cache/LocalCache$ValueReference; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lcom/google/common/cache/LocalCache$ValueReference", ";" } .end annotation .prologue .line 736 sget-object v0, Lcom/google/common/cache/LocalCache;->UNSET:Lcom/google/common/cache/LocalCache$ValueReference; return-object v0 .end method # virtual methods .method public cleanUp()V .locals 4 .prologue .line 3857 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->segments:[Lcom/google/common/cache/LocalCache$Segment; array-length v2, v1 const/4 v0, 0x0 :goto_0 if-ge v0, v2, :cond_0 aget-object v3, v1, v0 .line 3858 invoke-virtual {v3}, Lcom/google/common/cache/LocalCache$Segment;->cleanUp()V .line 3857 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 3860 :cond_0 return-void .end method .method public clear()V .locals 4 .prologue .line 4203 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->segments:[Lcom/google/common/cache/LocalCache$Segment; array-length v2, v1 const/4 v0, 0x0 :goto_0 if-ge v0, v2, :cond_0 aget-object v3, v1, v0 .line 4204 invoke-virtual {v3}, Lcom/google/common/cache/LocalCache$Segment;->clear()V .line 4203 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 4206 :cond_0 return-void .end method .method public containsKey(Ljava/lang/Object;)Z .locals 2 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue .line 4093 if-nez p1, :cond_0 .line 4094 const/4 v0, 0x0 .line 4097 :goto_0 return v0 .line 4096 :cond_0 invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 4097 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 invoke-virtual {v1, p1, v0}, Lcom/google/common/cache/LocalCache$Segment;->containsKey(Ljava/lang/Object;I)Z move-result v0 goto :goto_0 .end method .method public containsValue(Ljava/lang/Object;)Z .locals 20 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue .line 4103 if-nez p1, :cond_0 .line 4104 const/4 v4, 0x0 .line 4138 :goto_0 return v4 .line 4112 :cond_0 move-object/from16 v0, p0 iget-object v4, v0, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker; invoke-virtual {v4}, Lcom/google/common/base/Ticker;->read()J move-result-wide v14 .line 4113 move-object/from16 v0, p0 iget-object v11, v0, Lcom/google/common/cache/LocalCache;->segments:[Lcom/google/common/cache/LocalCache$Segment; .line 4114 const-wide/16 v8, -0x1 .line 4115 const/4 v4, 0x0 move v10, v4 move-wide v12, v8 :goto_1 const/4 v4, 0x3 if-ge v10, v4, :cond_5 .line 4116 const-wide/16 v6, 0x0 .line 4117 array-length v0, v11 move/from16 v16, v0 const/4 v4, 0x0 move-wide v8, v6 move v6, v4 :goto_2 move/from16 v0, v16 if-ge v6, v0, :cond_4 aget-object v7, v11, v6 .line 4120 iget v4, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I .line 4122 iget-object v0, v7, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray; move-object/from16 v17, v0 .line 4123 const/4 v4, 0x0 move v5, v4 :goto_3 invoke-virtual/range {v17 .. v17}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I move-result v4 if-ge v5, v4, :cond_3 .line 4124 move-object/from16 v0, v17 invoke-virtual {v0, v5}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object; move-result-object v4 check-cast v4, Lcom/google/common/cache/LocalCache$ReferenceEntry; :goto_4 if-eqz v4, :cond_2 .line 4125 invoke-virtual {v7, v4, v14, v15}, Lcom/google/common/cache/LocalCache$Segment;->getLiveValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Ljava/lang/Object; move-result-object v18 .line 4126 if-eqz v18, :cond_1 move-object/from16 v0, p0 iget-object v0, v0, Lcom/google/common/cache/LocalCache;->valueEquivalence:Lcom/google/common/base/Equivalence; move-object/from16 v19, v0 move-object/from16 v0, v19 move-object/from16 v1, p1 move-object/from16 v2, v18 invoke-virtual {v0, v1, v2}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v18 if-eqz v18, :cond_1 .line 4127 const/4 v4, 0x1 goto :goto_0 .line 4124 :cond_1 invoke-interface {v4}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry; move-result-object v4 goto :goto_4 .line 4123 :cond_2 add-int/lit8 v4, v5, 0x1 move v5, v4 goto :goto_3 .line 4131 :cond_3 iget v4, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I int-to-long v4, v4 add-long/2addr v8, v4 .line 4117 add-int/lit8 v4, v6, 0x1 move v6, v4 goto :goto_2 .line 4133 :cond_4 cmp-long v4, v8, v12 if-nez v4, :cond_6 .line 4138 :cond_5 const/4 v4, 0x0 goto :goto_0 .line 4115 :cond_6 add-int/lit8 v4, v10, 0x1 move v10, v4 move-wide v12, v8 goto :goto_1 .end method .method copyEntry(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry; .locals 1 .annotation build Lcom/google/common/annotations/VisibleForTesting; .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";)", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";" } .end annotation .annotation build Ljavax/annotation/concurrent/GuardedBy; value = "Segment.this" .end annotation .prologue .line 1822 invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I move-result v0 .line 1823 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v0 invoke-virtual {v0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->copyEntry(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry; move-result-object v0 return-object v0 .end method .method createSegment(IJLcom/google/common/cache/AbstractCache$StatsCounter;)Lcom/google/common/cache/LocalCache$Segment; .locals 8 .annotation system Ldalvik/annotation/Signature; value = { "(IJ", "Lcom/google/common/cache/AbstractCache$StatsCounter;", ")", "Lcom/google/common/cache/LocalCache$Segment", ";" } .end annotation .prologue .line 1874 new-instance v1, Lcom/google/common/cache/LocalCache$Segment; move-object v2, p0 move v3, p1 move-wide v4, p2 move-object v6, p4 invoke-direct/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->(Lcom/google/common/cache/LocalCache;IJLcom/google/common/cache/AbstractCache$StatsCounter;)V return-object v1 .end method .method customWeigher()Z .locals 2 .prologue .line 320 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->weigher:Lcom/google/common/cache/Weigher; sget-object v1, Lcom/google/common/cache/CacheBuilder$OneWeigher;->INSTANCE:Lcom/google/common/cache/CacheBuilder$OneWeigher; if-eq v0, v1, :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method public entrySet()Ljava/util/Set; .locals 1 .annotation build Lcom/google/common/annotations/GwtIncompatible; value = "Not supported." .end annotation .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/Set", "<", "Ljava/util/Map$Entry", ";>;" } .end annotation .prologue .line 4239 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->entrySet:Ljava/util/Set; .line 4240 if-eqz v0, :cond_0 :goto_0 return-object v0 :cond_0 new-instance v0, Lcom/google/common/cache/LocalCache$EntrySet; invoke-direct {v0, p0, p0}, Lcom/google/common/cache/LocalCache$EntrySet;->(Lcom/google/common/cache/LocalCache;Ljava/util/concurrent/ConcurrentMap;)V iput-object v0, p0, Lcom/google/common/cache/LocalCache;->entrySet:Ljava/util/Set; goto :goto_0 .end method .method evictsBySize()Z .locals 4 .prologue .line 316 iget-wide v0, p0, Lcom/google/common/cache/LocalCache;->maxWeight:J const-wide/16 v2, 0x0 cmp-long v0, v0, v2 if-ltz v0, :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method expires()Z .locals 1 .prologue .line 324 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->expiresAfterWrite()Z move-result v0 if-nez v0, :cond_0 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->expiresAfterAccess()Z move-result v0 if-eqz v0, :cond_1 :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_1 const/4 v0, 0x0 goto :goto_0 .end method .method expiresAfterAccess()Z .locals 4 .prologue .line 332 iget-wide v0, p0, Lcom/google/common/cache/LocalCache;->expireAfterAccessNanos:J const-wide/16 v2, 0x0 cmp-long v0, v0, v2 if-lez v0, :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method expiresAfterWrite()Z .locals 4 .prologue .line 328 iget-wide v0, p0, Lcom/google/common/cache/LocalCache;->expireAfterWriteNanos:J const-wide/16 v2, 0x0 cmp-long v0, v0, v2 if-lez v0, :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method public get(Ljava/lang/Object;)Ljava/lang/Object; .locals 2 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Object;", ")TV;" } .end annotation .annotation runtime Ljavax/annotation/Nullable; .end annotation .prologue .line 3913 if-nez p1, :cond_0 .line 3914 const/4 v0, 0x0 .line 3917 :goto_0 return-object v0 .line 3916 :cond_0 invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 3917 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 invoke-virtual {v1, p1, v0}, Lcom/google/common/cache/LocalCache$Segment;->get(Ljava/lang/Object;I)Ljava/lang/Object; move-result-object v0 goto :goto_0 .end method .method get(Ljava/lang/Object;Lcom/google/common/cache/CacheLoader;)Ljava/lang/Object; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(TK;", "Lcom/google/common/cache/CacheLoader", "<-TK;TV;>;)TV;" } .end annotation .prologue .line 3933 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 3934 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 invoke-virtual {v1, p1, v0, p2}, Lcom/google/common/cache/LocalCache$Segment;->get(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;)Ljava/lang/Object; move-result-object v0 return-object v0 .end method .method getAll(Ljava/lang/Iterable;)Lcom/google/common/collect/ImmutableMap; .locals 9 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Iterable", "<+TK;>;)", "Lcom/google/common/collect/ImmutableMap", ";" } .end annotation .prologue const/4 v0, 0x0 .line 3964 .line 3967 invoke-static {}, Lcom/google/common/collect/Maps;->newLinkedHashMap()Ljava/util/LinkedHashMap; move-result-object v3 .line 3968 invoke-static {}, Lcom/google/common/collect/Sets;->newLinkedHashSet()Ljava/util/LinkedHashSet; move-result-object v2 .line 3969 invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v4 move v1, v0 :cond_0 :goto_0 invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z move-result v5 if-eqz v5, :cond_2 invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v5 .line 3970 invoke-virtual {p0, v5}, Lcom/google/common/cache/LocalCache;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v6 .line 3971 invoke-interface {v3, v5}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z move-result v7 if-nez v7, :cond_0 .line 3972 invoke-interface {v3, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .line 3973 if-nez v6, :cond_1 .line 3974 add-int/lit8 v0, v0, 0x1 .line 3975 invoke-interface {v2, v5}, Ljava/util/Set;->add(Ljava/lang/Object;)Z goto :goto_0 .line 3977 :cond_1 add-int/lit8 v1, v1, 0x1 goto :goto_0 .line 3983 :cond_2 :try_start_0 invoke-interface {v2}, Ljava/util/Set;->isEmpty()Z :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_1 move-result v4 if-nez v4, :cond_6 .line 3985 :try_start_1 iget-object v4, p0, Lcom/google/common/cache/LocalCache;->defaultLoader:Lcom/google/common/cache/CacheLoader; invoke-virtual {p0, v2, v4}, Lcom/google/common/cache/LocalCache;->loadAll(Ljava/util/Set;Lcom/google/common/cache/CacheLoader;)Ljava/util/Map; move-result-object v4 .line 3986 invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v5 :goto_1 invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z move-result v6 if-eqz v6, :cond_4 invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v6 .line 3987 invoke-interface {v4, v6}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v7 .line 3988 if-nez v7, :cond_3 .line 3989 new-instance v4, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException; new-instance v5, Ljava/lang/StringBuilder; invoke-direct {v5}, Ljava/lang/StringBuilder;->()V const-string v7, "loadAll failed to return a value for " invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v5 invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v5 invoke-direct {v4, v5}, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException;->(Ljava/lang/String;)V throw v4 :try_end_1 .catch Lcom/google/common/cache/CacheLoader$UnsupportedLoadingOperationException; {:try_start_1 .. :try_end_1} :catch_0 .catchall {:try_start_1 .. :try_end_1} :catchall_1 .line 3993 :catch_0 move-exception v4 .line 3995 :try_start_2 invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator; :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_1 move-result-object v4 move v2, v0 :goto_2 :try_start_3 invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_5 invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 .line 3996 add-int/lit8 v2, v2, -0x1 .line 3997 iget-object v5, p0, Lcom/google/common/cache/LocalCache;->defaultLoader:Lcom/google/common/cache/CacheLoader; invoke-virtual {p0, v0, v5}, Lcom/google/common/cache/LocalCache;->get(Ljava/lang/Object;Lcom/google/common/cache/CacheLoader;)Ljava/lang/Object; move-result-object v5 invoke-interface {v3, v0, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; :try_end_3 .catchall {:try_start_3 .. :try_end_3} :catchall_0 goto :goto_2 .line 4003 :catchall_0 move-exception v0 :goto_3 iget-object v3, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; invoke-interface {v3, v1}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordHits(I)V .line 4004 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; invoke-interface {v1, v2}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V throw v0 .line 3991 :cond_3 :try_start_4 invoke-interface {v3, v6, v7}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; :try_end_4 .catch Lcom/google/common/cache/CacheLoader$UnsupportedLoadingOperationException; {:try_start_4 .. :try_end_4} :catch_0 .catchall {:try_start_4 .. :try_end_4} :catchall_1 goto :goto_1 .line 4003 :catchall_1 move-exception v2 move-object v8, v2 move v2, v0 move-object v0, v8 goto :goto_3 :cond_4 move v2, v0 .line 4001 :cond_5 :goto_4 :try_start_5 invoke-static {v3}, Lcom/google/common/collect/ImmutableMap;->copyOf(Ljava/util/Map;)Lcom/google/common/collect/ImmutableMap; :try_end_5 .catchall {:try_start_5 .. :try_end_5} :catchall_0 move-result-object v0 .line 4003 iget-object v3, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; invoke-interface {v3, v1}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordHits(I)V .line 4004 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; invoke-interface {v1, v2}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V return-object v0 :cond_6 move v2, v0 goto :goto_4 .end method .method getAllPresent(Ljava/lang/Iterable;)Lcom/google/common/collect/ImmutableMap; .locals 6 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Iterable", "<*>;)", "Lcom/google/common/collect/ImmutableMap", ";" } .end annotation .prologue const/4 v0, 0x0 .line 3942 .line 3945 invoke-static {}, Lcom/google/common/collect/Maps;->newLinkedHashMap()Ljava/util/LinkedHashMap; move-result-object v2 .line 3946 invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v3 move v1, v0 :goto_0 invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z move-result v4 if-eqz v4, :cond_1 invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v4 .line 3947 invoke-virtual {p0, v4}, Lcom/google/common/cache/LocalCache;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v5 .line 3948 if-nez v5, :cond_0 .line 3949 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 3954 :cond_0 invoke-interface {v2, v4, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .line 3955 add-int/lit8 v1, v1, 0x1 goto :goto_0 .line 3958 :cond_1 iget-object v3, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; invoke-interface {v3, v1}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordHits(I)V .line 3959 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; invoke-interface {v1, v0}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V .line 3960 invoke-static {v2}, Lcom/google/common/collect/ImmutableMap;->copyOf(Ljava/util/Map;)Lcom/google/common/collect/ImmutableMap; move-result-object v0 return-object v0 .end method .method getEntry(Ljava/lang/Object;)Lcom/google/common/cache/LocalCache$ReferenceEntry; .locals 2 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Object;", ")", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";" } .end annotation .prologue .line 4078 if-nez p1, :cond_0 .line 4079 const/4 v0, 0x0 .line 4082 :goto_0 return-object v0 .line 4081 :cond_0 invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 4082 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 invoke-virtual {v1, p1, v0}, Lcom/google/common/cache/LocalCache$Segment;->getEntry(Ljava/lang/Object;I)Lcom/google/common/cache/LocalCache$ReferenceEntry; move-result-object v0 goto :goto_0 .end method .method public getIfPresent(Ljava/lang/Object;)Ljava/lang/Object; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Object;", ")TV;" } .end annotation .annotation runtime Ljavax/annotation/Nullable; .end annotation .prologue const/4 v2, 0x1 .line 3922 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 3923 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 invoke-virtual {v1, p1, v0}, Lcom/google/common/cache/LocalCache$Segment;->get(Ljava/lang/Object;I)Ljava/lang/Object; move-result-object v0 .line 3924 if-nez v0, :cond_0 .line 3925 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; invoke-interface {v1, v2}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V .line 3929 :goto_0 return-object v0 .line 3927 :cond_0 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; invoke-interface {v1, v2}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordHits(I)V goto :goto_0 .end method .method getLiveValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Ljava/lang/Object; .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";J)TV;" } .end annotation .annotation runtime Ljavax/annotation/Nullable; .end annotation .prologue const/4 v0, 0x0 .line 1885 invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object; move-result-object v1 if-nez v1, :cond_1 .line 1896 :cond_0 :goto_0 return-object v0 .line 1888 :cond_1 invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference; move-result-object v1 invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object; move-result-object v1 .line 1889 if-eqz v1, :cond_0 .line 1893 invoke-virtual {p0, p1, p2, p3}, Lcom/google/common/cache/LocalCache;->isExpired(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Z move-result v2 if-nez v2, :cond_0 move-object v0, v1 .line 1896 goto :goto_0 .end method .method getOrLoad(Ljava/lang/Object;)Ljava/lang/Object; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(TK;)TV;" } .end annotation .prologue .line 3938 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->defaultLoader:Lcom/google/common/cache/CacheLoader; invoke-virtual {p0, p1, v0}, Lcom/google/common/cache/LocalCache;->get(Ljava/lang/Object;Lcom/google/common/cache/CacheLoader;)Ljava/lang/Object; move-result-object v0 return-object v0 .end method .method hash(Ljava/lang/Object;)I .locals 1 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue .line 1837 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence; invoke-virtual {v0, p1}, Lcom/google/common/base/Equivalence;->hash(Ljava/lang/Object;)I move-result v0 .line 1838 invoke-static {v0}, Lcom/google/common/cache/LocalCache;->rehash(I)I move-result v0 return v0 .end method .method invalidateAll(Ljava/lang/Iterable;)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Iterable", "<*>;)V" } .end annotation .prologue .line 4210 invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v0 :goto_0 invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_0 invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 .line 4211 invoke-virtual {p0, v1}, Lcom/google/common/cache/LocalCache;->remove(Ljava/lang/Object;)Ljava/lang/Object; goto :goto_0 .line 4213 :cond_0 return-void .end method .method public isEmpty()Z .locals 10 .prologue const-wide/16 v4, 0x0 const/4 v1, 0x0 .line 3873 .line 3874 iget-object v6, p0, Lcom/google/common/cache/LocalCache;->segments:[Lcom/google/common/cache/LocalCache$Segment; move v0, v1 move-wide v2, v4 .line 3875 :goto_0 array-length v7, v6 if-ge v0, v7, :cond_2 .line 3876 aget-object v7, v6, v0 iget v7, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I if-eqz v7, :cond_1 .line 3893 :cond_0 :goto_1 return v1 .line 3879 :cond_1 aget-object v7, v6, v0 iget v7, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I int-to-long v8, v7 add-long/2addr v2, v8 .line 3875 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 3882 :cond_2 cmp-long v0, v2, v4 if-eqz v0, :cond_4 move v0, v1 .line 3883 :goto_2 array-length v7, v6 if-ge v0, v7, :cond_3 .line 3884 aget-object v7, v6, v0 iget v7, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I if-nez v7, :cond_0 .line 3887 aget-object v7, v6, v0 iget v7, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I int-to-long v8, v7 sub-long/2addr v2, v8 .line 3883 add-int/lit8 v0, v0, 0x1 goto :goto_2 .line 3889 :cond_3 cmp-long v0, v2, v4 if-nez v0, :cond_0 .line 3893 :cond_4 const/4 v1, 0x1 goto :goto_1 .end method .method isExpired(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Z .locals 6 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";J)Z" } .end annotation .prologue const/4 v0, 0x1 .line 1905 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 1906 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->expiresAfterAccess()Z move-result v1 if-eqz v1, :cond_1 invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getAccessTime()J move-result-wide v2 sub-long v2, p2, v2 iget-wide v4, p0, Lcom/google/common/cache/LocalCache;->expireAfterAccessNanos:J cmp-long v1, v2, v4 if-ltz v1, :cond_1 .line 1914 :cond_0 :goto_0 return v0 .line 1910 :cond_1 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->expiresAfterWrite()Z move-result v1 if-eqz v1, :cond_2 invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getWriteTime()J move-result-wide v2 sub-long v2, p2, v2 iget-wide v4, p0, Lcom/google/common/cache/LocalCache;->expireAfterWriteNanos:J cmp-long v1, v2, v4 if-gez v1, :cond_0 .line 1914 :cond_2 const/4 v0, 0x0 goto :goto_0 .end method .method isLive(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Z .locals 2 .annotation build Lcom/google/common/annotations/VisibleForTesting; .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";J)Z" } .end annotation .prologue .line 1858 invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I move-result v0 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v0 invoke-virtual {v0, p1, p2, p3}, Lcom/google/common/cache/LocalCache$Segment;->getLiveValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Ljava/lang/Object; move-result-object v0 if-eqz v0, :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method public keySet()Ljava/util/Set; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/Set", ";" } .end annotation .prologue .line 4220 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->keySet:Ljava/util/Set; .line 4221 if-eqz v0, :cond_0 :goto_0 return-object v0 :cond_0 new-instance v0, Lcom/google/common/cache/LocalCache$KeySet; invoke-direct {v0, p0, p0}, Lcom/google/common/cache/LocalCache$KeySet;->(Lcom/google/common/cache/LocalCache;Ljava/util/concurrent/ConcurrentMap;)V iput-object v0, p0, Lcom/google/common/cache/LocalCache;->keySet:Ljava/util/Set; goto :goto_0 .end method .method loadAll(Ljava/util/Set;Lcom/google/common/cache/CacheLoader;)Ljava/util/Map; .locals 7 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Set", "<+TK;>;", "Lcom/google/common/cache/CacheLoader", "<-TK;TV;>;)", "Ljava/util/Map", ";" } .end annotation .annotation runtime Ljavax/annotation/Nullable; .end annotation .prologue const/4 v2, 0x1 const/4 v0, 0x0 .line 4015 invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 4016 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 4017 invoke-static {}, Lcom/google/common/base/Stopwatch;->createStarted()Lcom/google/common/base/Stopwatch; move-result-object v3 .line 4022 :try_start_0 invoke-virtual {p2, p1}, Lcom/google/common/cache/CacheLoader;->loadAll(Ljava/lang/Iterable;)Ljava/util/Map; :try_end_0 .catch Lcom/google/common/cache/CacheLoader$UnsupportedLoadingOperationException; {:try_start_0 .. :try_end_0} :catch_0 .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_1 .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_2 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_3 .catch Ljava/lang/Error; {:try_start_0 .. :try_end_0} :catch_4 .catchall {:try_start_0 .. :try_end_0} :catchall_1 move-result-object v4 .line 4043 if-nez v4, :cond_1 .line 4044 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; sget-object v1, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit; invoke-virtual {v3, v1}, Lcom/google/common/base/Stopwatch;->elapsed(Ljava/util/concurrent/TimeUnit;)J move-result-wide v2 invoke-interface {v0, v2, v3}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordLoadException(J)V .line 4045 new-instance v0, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException; new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, " returned null map from loadAll" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException;->(Ljava/lang/String;)V throw v0 .line 4025 :catch_0 move-exception v0 .line 4027 :try_start_1 throw v0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 .line 4038 :catchall_0 move-exception v0 :goto_0 if-nez v2, :cond_0 .line 4039 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; sget-object v2, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit; invoke-virtual {v3, v2}, Lcom/google/common/base/Stopwatch;->elapsed(Ljava/util/concurrent/TimeUnit;)J move-result-wide v2 invoke-interface {v1, v2, v3}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordLoadException(J)V :cond_0 throw v0 .line 4028 :catch_1 move-exception v1 .line 4029 :try_start_2 invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread; move-result-object v2 invoke-virtual {v2}, Ljava/lang/Thread;->interrupt()V .line 4030 new-instance v2, Ljava/util/concurrent/ExecutionException; invoke-direct {v2, v1}, Ljava/util/concurrent/ExecutionException;->(Ljava/lang/Throwable;)V throw v2 .line 4038 :catchall_1 move-exception v1 move v2, v0 move-object v0, v1 goto :goto_0 .line 4031 :catch_2 move-exception v1 .line 4032 new-instance v2, Lcom/google/common/util/concurrent/UncheckedExecutionException; invoke-direct {v2, v1}, Lcom/google/common/util/concurrent/UncheckedExecutionException;->(Ljava/lang/Throwable;)V throw v2 .line 4033 :catch_3 move-exception v1 .line 4034 new-instance v2, Ljava/util/concurrent/ExecutionException; invoke-direct {v2, v1}, Ljava/util/concurrent/ExecutionException;->(Ljava/lang/Throwable;)V throw v2 .line 4035 :catch_4 move-exception v1 .line 4036 new-instance v2, Lcom/google/common/util/concurrent/ExecutionError; invoke-direct {v2, v1}, Lcom/google/common/util/concurrent/ExecutionError;->(Ljava/lang/Error;)V throw v2 :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_1 .line 4048 :cond_1 invoke-virtual {v3}, Lcom/google/common/base/Stopwatch;->stop()Lcom/google/common/base/Stopwatch; .line 4051 invoke-interface {v4}, Ljava/util/Map;->entrySet()Ljava/util/Set; move-result-object v1 invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v5 move v1, v0 :goto_1 invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_4 invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/Map$Entry; .line 4052 invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object; move-result-object v6 .line 4053 invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v0 .line 4054 if-eqz v6, :cond_2 if-nez v0, :cond_3 :cond_2 move v0, v2 :goto_2 move v1, v0 .line 4060 goto :goto_1 .line 4058 :cond_3 invoke-virtual {p0, v6, v0}, Lcom/google/common/cache/LocalCache;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; move v0, v1 goto :goto_2 .line 4062 :cond_4 if-eqz v1, :cond_5 .line 4063 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; sget-object v1, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit; invoke-virtual {v3, v1}, Lcom/google/common/base/Stopwatch;->elapsed(Ljava/util/concurrent/TimeUnit;)J move-result-wide v2 invoke-interface {v0, v2, v3}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordLoadException(J)V .line 4064 new-instance v0, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException; new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, " returned null keys or values from loadAll" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException;->(Ljava/lang/String;)V throw v0 .line 4068 :cond_5 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->globalStatsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter; sget-object v1, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit; invoke-virtual {v3, v1}, Lcom/google/common/base/Stopwatch;->elapsed(Ljava/util/concurrent/TimeUnit;)J move-result-wide v2 invoke-interface {v0, v2, v3}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordLoadSuccess(J)V .line 4069 return-object v4 .end method .method longSize()J .locals 6 .prologue .line 3897 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->segments:[Lcom/google/common/cache/LocalCache$Segment; .line 3898 const-wide/16 v2, 0x0 .line 3899 const/4 v0, 0x0 :goto_0 array-length v4, v1 if-ge v0, v4, :cond_0 .line 3900 aget-object v4, v1, v0 iget v4, v4, Lcom/google/common/cache/LocalCache$Segment;->count:I int-to-long v4, v4 add-long/2addr v2, v4 .line 3899 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 3902 :cond_0 return-wide v2 .end method .method newEntry(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry; .locals 1 .param p3 # Lcom/google/common/cache/LocalCache$ReferenceEntry; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .annotation build Lcom/google/common/annotations/VisibleForTesting; .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(TK;I", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";)", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";" } .end annotation .annotation build Ljavax/annotation/concurrent/GuardedBy; value = "Segment.this" .end annotation .prologue .line 1813 invoke-virtual {p0, p2}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v0 invoke-virtual {v0, p1, p2, p3}, Lcom/google/common/cache/LocalCache$Segment;->newEntry(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry; move-result-object v0 return-object v0 .end method .method final newSegmentArray(I)[Lcom/google/common/cache/LocalCache$Segment; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(I)[", "Lcom/google/common/cache/LocalCache$Segment", ";" } .end annotation .prologue .line 1963 new-array v0, p1, [Lcom/google/common/cache/LocalCache$Segment; return-object v0 .end method .method newValueReference(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;I)Lcom/google/common/cache/LocalCache$ValueReference; .locals 3 .annotation build Lcom/google/common/annotations/VisibleForTesting; .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";TV;I)", "Lcom/google/common/cache/LocalCache$ValueReference", ";" } .end annotation .annotation build Ljavax/annotation/concurrent/GuardedBy; value = "Segment.this" .end annotation .prologue .line 1832 invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I move-result v0 .line 1833 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->valueStrength:Lcom/google/common/cache/LocalCache$Strength; invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v0 invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v2 invoke-virtual {v1, v0, p1, v2, p3}, Lcom/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; move-result-object v0 return-object v0 .end method .method processPendingNotifications()V .locals 4 .prologue .line 1952 :goto_0 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->removalNotificationQueue:Ljava/util/Queue; invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/google/common/cache/RemovalNotification; if-eqz v0, :cond_0 .line 1954 :try_start_0 iget-object v1, p0, Lcom/google/common/cache/LocalCache;->removalListener:Lcom/google/common/cache/RemovalListener; invoke-interface {v1, v0}, Lcom/google/common/cache/RemovalListener;->onRemoval(Lcom/google/common/cache/RemovalNotification;)V :try_end_0 .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 .line 1955 :catch_0 move-exception v0 .line 1956 sget-object v1, Lcom/google/common/cache/LocalCache;->logger:Ljava/util/logging/Logger; sget-object v2, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level; const-string v3, "Exception thrown by removal listener" invoke-virtual {v1, v2, v3, v0}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V goto :goto_0 .line 1959 :cond_0 return-void .end method .method public put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(TK;TV;)TV;" } .end annotation .prologue .line 4143 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 4144 invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 4145 invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 4146 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 const/4 v2, 0x0 invoke-virtual {v1, p1, v0, p2, v2}, Lcom/google/common/cache/LocalCache$Segment;->put(Ljava/lang/Object;ILjava/lang/Object;Z)Ljava/lang/Object; move-result-object v0 return-object v0 .end method .method public putAll(Ljava/util/Map;)V .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Map", "<+TK;+TV;>;)V" } .end annotation .prologue .line 4159 invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set; move-result-object v0 invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v1 :goto_0 invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_0 invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/Map$Entry; .line 4160 invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object; move-result-object v2 invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v0 invoke-virtual {p0, v2, v0}, Lcom/google/common/cache/LocalCache;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; goto :goto_0 .line 4162 :cond_0 return-void .end method .method public putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(TK;TV;)TV;" } .end annotation .prologue .line 4151 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 4152 invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 4153 invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 4154 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 const/4 v2, 0x1 invoke-virtual {v1, p1, v0, p2, v2}, Lcom/google/common/cache/LocalCache$Segment;->put(Ljava/lang/Object;ILjava/lang/Object;Z)Ljava/lang/Object; move-result-object v0 return-object v0 .end method .method reclaimKey(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/LocalCache$ReferenceEntry", ";)V" } .end annotation .prologue .line 1848 invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I move-result v0 .line 1849 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 invoke-virtual {v1, p1, v0}, Lcom/google/common/cache/LocalCache$Segment;->reclaimKey(Lcom/google/common/cache/LocalCache$ReferenceEntry;I)Z .line 1850 return-void .end method .method reclaimValue(Lcom/google/common/cache/LocalCache$ValueReference;)V .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/cache/LocalCache$ValueReference", ";)V" } .end annotation .prologue .line 1842 invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ValueReference;->getEntry()Lcom/google/common/cache/LocalCache$ReferenceEntry; move-result-object v0 .line 1843 invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I move-result v1 .line 1844 invoke-virtual {p0, v1}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v2 invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object; move-result-object v0 invoke-virtual {v2, v0, v1, p1}, Lcom/google/common/cache/LocalCache$Segment;->reclaimValue(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;)Z .line 1845 return-void .end method .method recordsAccess()Z .locals 1 .prologue .line 352 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->expiresAfterAccess()Z move-result v0 return v0 .end method .method recordsTime()Z .locals 1 .prologue .line 356 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->recordsWrite()Z move-result v0 if-nez v0, :cond_0 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->recordsAccess()Z move-result v0 if-eqz v0, :cond_1 :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_1 const/4 v0, 0x0 goto :goto_0 .end method .method recordsWrite()Z .locals 1 .prologue .line 348 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->expiresAfterWrite()Z move-result v0 if-nez v0, :cond_0 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->refreshes()Z move-result v0 if-eqz v0, :cond_1 :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_1 const/4 v0, 0x0 goto :goto_0 .end method .method refresh(Ljava/lang/Object;)V .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "(TK;)V" } .end annotation .prologue .line 4086 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 4087 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 iget-object v2, p0, Lcom/google/common/cache/LocalCache;->defaultLoader:Lcom/google/common/cache/CacheLoader; const/4 v3, 0x0 invoke-virtual {v1, p1, v0, v2, v3}, Lcom/google/common/cache/LocalCache$Segment;->refresh(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;Z)Ljava/lang/Object; .line 4088 return-void .end method .method refreshes()Z .locals 4 .prologue .line 336 iget-wide v0, p0, Lcom/google/common/cache/LocalCache;->refreshNanos:J const-wide/16 v2, 0x0 cmp-long v0, v0, v2 if-lez v0, :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method public remove(Ljava/lang/Object;)Ljava/lang/Object; .locals 2 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Object;", ")TV;" } .end annotation .prologue .line 4166 if-nez p1, :cond_0 .line 4167 const/4 v0, 0x0 .line 4170 :goto_0 return-object v0 .line 4169 :cond_0 invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 4170 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 invoke-virtual {v1, p1, v0}, Lcom/google/common/cache/LocalCache$Segment;->remove(Ljava/lang/Object;I)Ljava/lang/Object; move-result-object v0 goto :goto_0 .end method .method public remove(Ljava/lang/Object;Ljava/lang/Object;)Z .locals 2 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .param p2 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue .line 4175 if-eqz p1, :cond_0 if-nez p2, :cond_1 .line 4176 :cond_0 const/4 v0, 0x0 .line 4179 :goto_0 return v0 .line 4178 :cond_1 invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 4179 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 invoke-virtual {v1, p1, v0, p2}, Lcom/google/common/cache/LocalCache$Segment;->remove(Ljava/lang/Object;ILjava/lang/Object;)Z move-result v0 goto :goto_0 .end method .method public replace(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(TK;TV;)TV;" } .end annotation .prologue .line 4195 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 4196 invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 4197 invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 4198 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 invoke-virtual {v1, p1, v0, p2}, Lcom/google/common/cache/LocalCache$Segment;->replace(Ljava/lang/Object;ILjava/lang/Object;)Ljava/lang/Object; move-result-object v0 return-object v0 .end method .method public replace(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z .locals 2 .param p2 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .annotation system Ldalvik/annotation/Signature; value = { "(TK;TV;TV;)Z" } .end annotation .prologue .line 4184 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 4185 invoke-static {p3}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 4186 if-nez p2, :cond_0 .line 4187 const/4 v0, 0x0 .line 4190 :goto_0 return v0 .line 4189 :cond_0 invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache;->hash(Ljava/lang/Object;)I move-result v0 .line 4190 invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache;->segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; move-result-object v1 invoke-virtual {v1, p1, v0, p2, p3}, Lcom/google/common/cache/LocalCache$Segment;->replace(Ljava/lang/Object;ILjava/lang/Object;Ljava/lang/Object;)Z move-result v0 goto :goto_0 .end method .method segmentFor(I)Lcom/google/common/cache/LocalCache$Segment; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(I)", "Lcom/google/common/cache/LocalCache$Segment", ";" } .end annotation .prologue .line 1869 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->segments:[Lcom/google/common/cache/LocalCache$Segment; iget v1, p0, Lcom/google/common/cache/LocalCache;->segmentShift:I ushr-int v1, p1, v1 iget v2, p0, Lcom/google/common/cache/LocalCache;->segmentMask:I and-int/2addr v1, v2 aget-object v0, v0, v1 return-object v0 .end method .method public size()I .locals 2 .prologue .line 3907 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->longSize()J move-result-wide v0 invoke-static {v0, v1}, Lcom/google/common/primitives/Ints;->saturatedCast(J)I move-result v0 return v0 .end method .method usesAccessEntries()Z .locals 1 .prologue .line 364 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->usesAccessQueue()Z move-result v0 if-nez v0, :cond_0 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->recordsAccess()Z move-result v0 if-eqz v0, :cond_1 :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_1 const/4 v0, 0x0 goto :goto_0 .end method .method usesAccessQueue()Z .locals 1 .prologue .line 340 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->expiresAfterAccess()Z move-result v0 if-nez v0, :cond_0 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->evictsBySize()Z move-result v0 if-eqz v0, :cond_1 :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_1 const/4 v0, 0x0 goto :goto_0 .end method .method usesKeyReferences()Z .locals 2 .prologue .line 368 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->keyStrength:Lcom/google/common/cache/LocalCache$Strength; sget-object v1, Lcom/google/common/cache/LocalCache$Strength;->STRONG:Lcom/google/common/cache/LocalCache$Strength; if-eq v0, v1, :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method usesValueReferences()Z .locals 2 .prologue .line 372 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->valueStrength:Lcom/google/common/cache/LocalCache$Strength; sget-object v1, Lcom/google/common/cache/LocalCache$Strength;->STRONG:Lcom/google/common/cache/LocalCache$Strength; if-eq v0, v1, :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method usesWriteEntries()Z .locals 1 .prologue .line 360 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->usesWriteQueue()Z move-result v0 if-nez v0, :cond_0 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->recordsWrite()Z move-result v0 if-eqz v0, :cond_1 :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_1 const/4 v0, 0x0 goto :goto_0 .end method .method usesWriteQueue()Z .locals 1 .prologue .line 344 invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->expiresAfterWrite()Z move-result v0 return v0 .end method .method public values()Ljava/util/Collection; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/Collection", ";" } .end annotation .prologue .line 4229 iget-object v0, p0, Lcom/google/common/cache/LocalCache;->values:Ljava/util/Collection; .line 4230 if-eqz v0, :cond_0 :goto_0 return-object v0 :cond_0 new-instance v0, Lcom/google/common/cache/LocalCache$Values; invoke-direct {v0, p0, p0}, Lcom/google/common/cache/LocalCache$Values;->(Lcom/google/common/cache/LocalCache;Ljava/util/concurrent/ConcurrentMap;)V iput-object v0, p0, Lcom/google/common/cache/LocalCache;->values:Ljava/util/Collection; goto :goto_0 .end method