今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5780 lines
159 KiB

.class Lcom/google/common/cache/LocalCache$Segment;
.super Ljava/util/concurrent/locks/ReentrantLock;
.source "LocalCache.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/cache/LocalCache;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = "Segment"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<K:",
"Ljava/lang/Object;",
"V:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/locks/ReentrantLock;"
}
.end annotation
# instance fields
.field final accessQueue:Ljava/util/Queue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Queue",
"<",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;>;"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.end field
.field volatile count:I
.field final keyReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/ReferenceQueue",
"<TK;>;"
}
.end annotation
.end field
.field final map:Lcom/google/common/cache/LocalCache;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/common/cache/LocalCache",
"<TK;TV;>;"
}
.end annotation
.end field
.field final maxSegmentWeight:J
.field modCount:I
.field final readCount:Ljava/util/concurrent/atomic/AtomicInteger;
.field final recencyQueue:Ljava/util/Queue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Queue",
"<",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;>;"
}
.end annotation
.end field
.field final statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.field volatile table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReferenceArray",
"<",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;>;"
}
.end annotation
.end field
.field threshold:I
.field totalWeight:I
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.end field
.field final valueReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/ReferenceQueue",
"<TV;>;"
}
.end annotation
.end field
.field final writeQueue:Ljava/util/Queue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Queue",
"<",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;>;"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.end field
# direct methods
.method constructor <init>(Lcom/google/common/cache/LocalCache;IJLcom/google/common/cache/AbstractCache$StatsCounter;)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache",
"<TK;TV;>;IJ",
"Lcom/google/common/cache/AbstractCache$StatsCounter;",
")V"
}
.end annotation
.prologue
const/4 v1, 0x0
.line 2088
invoke-direct {p0}, Ljava/util/concurrent/locks/ReentrantLock;-><init>()V
.line 2068
new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>()V
iput-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->readCount:Ljava/util/concurrent/atomic/AtomicInteger;
.line 2089
iput-object p1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2090
iput-wide p3, p0, Lcom/google/common/cache/LocalCache$Segment;->maxSegmentWeight:J
.line 2091
invoke-static {p5}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)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$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.line 2092
invoke-virtual {p0, p2}, Lcom/google/common/cache/LocalCache$Segment;->newEntryArray(I)Ljava/util/concurrent/atomic/AtomicReferenceArray;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache$Segment;->initTable(Ljava/util/concurrent/atomic/AtomicReferenceArray;)V
.line 2094
invoke-virtual {p1}, Lcom/google/common/cache/LocalCache;->usesKeyReferences()Z
move-result v0
if-eqz v0, :cond_1
new-instance v0, Ljava/lang/ref/ReferenceQueue;
invoke-direct {v0}, Ljava/lang/ref/ReferenceQueue;-><init>()V
:goto_0
iput-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->keyReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.line 2097
invoke-virtual {p1}, Lcom/google/common/cache/LocalCache;->usesValueReferences()Z
move-result v0
if-eqz v0, :cond_0
new-instance v1, Ljava/lang/ref/ReferenceQueue;
invoke-direct {v1}, Ljava/lang/ref/ReferenceQueue;-><init>()V
:cond_0
iput-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->valueReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.line 2100
invoke-virtual {p1}, Lcom/google/common/cache/LocalCache;->usesAccessQueue()Z
move-result v0
if-eqz v0, :cond_2
new-instance v0, Ljava/util/concurrent/ConcurrentLinkedQueue;
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentLinkedQueue;-><init>()V
:goto_1
iput-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->recencyQueue:Ljava/util/Queue;
.line 2104
invoke-virtual {p1}, Lcom/google/common/cache/LocalCache;->usesWriteQueue()Z
move-result v0
if-eqz v0, :cond_3
new-instance v0, Lcom/google/common/cache/LocalCache$WriteQueue;
invoke-direct {v0}, Lcom/google/common/cache/LocalCache$WriteQueue;-><init>()V
:goto_2
iput-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
.line 2108
invoke-virtual {p1}, Lcom/google/common/cache/LocalCache;->usesAccessQueue()Z
move-result v0
if-eqz v0, :cond_4
new-instance v0, Lcom/google/common/cache/LocalCache$AccessQueue;
invoke-direct {v0}, Lcom/google/common/cache/LocalCache$AccessQueue;-><init>()V
:goto_3
iput-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
.line 2111
return-void
:cond_1
move-object v0, v1
.line 2094
goto :goto_0
.line 2100
:cond_2
invoke-static {}, Lcom/google/common/cache/LocalCache;->discardingQueue()Ljava/util/Queue;
move-result-object v0
goto :goto_1
.line 2104
:cond_3
invoke-static {}, Lcom/google/common/cache/LocalCache;->discardingQueue()Ljava/util/Queue;
move-result-object v0
goto :goto_2
.line 2108
:cond_4
invoke-static {}, Lcom/google/common/cache/LocalCache;->discardingQueue()Ljava/util/Queue;
move-result-object v0
goto :goto_3
.end method
# virtual methods
.method cleanUp()V
.locals 2
.prologue
.line 3437
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v0}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v0
.line 3438
invoke-virtual {p0, v0, v1}, Lcom/google/common/cache/LocalCache$Segment;->runLockedCleanup(J)V
.line 3439
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->runUnlockedCleanup()V
.line 3440
return-void
.end method
.method clear()V
.locals 5
.prologue
const/4 v1, 0x0
.line 3214
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
if-eqz v0, :cond_4
.line 3215
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 3217
:try_start_0
iget-object v3, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
move v2, v1
.line 3218
:goto_0
invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
if-ge v2, v0, :cond_2
.line 3219
invoke-virtual {v3, v2}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
:goto_1
if-eqz v0, :cond_1
.line 3221
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v4
invoke-interface {v4}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v4
if-eqz v4, :cond_0
.line 3222
sget-object v4, Lcom/google/common/cache/RemovalCause;->EXPLICIT:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, v0, v4}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/RemovalCause;)V
.line 3219
:cond_0
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v0
goto :goto_1
.line 3218
:cond_1
add-int/lit8 v0, v2, 0x1
move v2, v0
goto :goto_0
:cond_2
move v0, v1
.line 3226
:goto_2
invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
if-ge v0, v1, :cond_3
.line 3227
const/4 v1, 0x0
invoke-virtual {v3, v0, v1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
.line 3226
add-int/lit8 v0, v0, 0x1
goto :goto_2
.line 3229
:cond_3
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->clearReferenceQueues()V
.line 3230
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
invoke-interface {v0}, Ljava/util/Queue;->clear()V
.line 3231
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
invoke-interface {v0}, Ljava/util/Queue;->clear()V
.line 3232
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->readCount:Ljava/util/concurrent/atomic/AtomicInteger;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->set(I)V
.line 3234
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3235
const/4 v0, 0x0
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3237
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3238
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 3241
:cond_4
return-void
.line 3237
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3238
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
throw v0
.end method
.method clearKeyReferenceQueue()V
.locals 1
.prologue
.line 2522
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->keyReferenceQueue:Ljava/lang/ref/ReferenceQueue;
invoke-virtual {v0}, Ljava/lang/ref/ReferenceQueue;->poll()Ljava/lang/ref/Reference;
move-result-object v0
if-nez v0, :cond_0
.line 2523
return-void
.end method
.method clearReferenceQueues()V
.locals 1
.prologue
.line 2513
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->usesKeyReferences()Z
move-result v0
if-eqz v0, :cond_0
.line 2514
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->clearKeyReferenceQueue()V
.line 2516
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->usesValueReferences()Z
move-result v0
if-eqz v0, :cond_1
.line 2517
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->clearValueReferenceQueue()V
.line 2519
:cond_1
return-void
.end method
.method clearValueReferenceQueue()V
.locals 1
.prologue
.line 2526
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->valueReferenceQueue:Ljava/lang/ref/ReferenceQueue;
invoke-virtual {v0}, Ljava/lang/ref/ReferenceQueue;->poll()Ljava/lang/ref/Reference;
move-result-object v0
if-nez v0, :cond_0
.line 2527
return-void
.end method
.method containsKey(Ljava/lang/Object;I)Z
.locals 4
.prologue
const/4 v0, 0x0
.line 2775
:try_start_0
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
if-eqz v1, :cond_2
.line 2776
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v1, v1, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v1}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v2
.line 2777
invoke-virtual {p0, p1, p2, v2, v3}, Lcom/google/common/cache/LocalCache$Segment;->getLiveEntry(Ljava/lang/Object;IJ)Lcom/google/common/cache/LocalCache$ReferenceEntry;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-result-object v1
.line 2778
if-nez v1, :cond_0
.line 2786
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
:goto_0
return v0
.line 2781
:cond_0
:try_start_1
invoke-interface {v1}, 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;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
move-result-object v1
if-eqz v1, :cond_1
const/4 v0, 0x1
.line 2786
:cond_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
goto :goto_0
:cond_2
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
goto :goto_0
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
throw v0
.end method
.method containsValue(Ljava/lang/Object;)Z
.locals 9
.annotation build Lcom/google/common/annotations/VisibleForTesting;
.end annotation
.prologue
const/4 v1, 0x0
.line 2797
:try_start_0
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
if-eqz v0, :cond_3
.line 2798
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v0}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v4
.line 2799
iget-object v3, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2800
invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v6
move v2, v1
.line 2801
:goto_0
if-ge v2, v6, :cond_3
.line 2802
invoke-virtual {v3, v2}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
:goto_1
if-eqz v0, :cond_2
.line 2803
invoke-virtual {p0, v0, v4, v5}, Lcom/google/common/cache/LocalCache$Segment;->getLiveValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Ljava/lang/Object;
move-result-object v7
.line 2804
if-nez v7, :cond_1
.line 2802
:cond_0
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v0
goto :goto_1
.line 2807
:cond_1
iget-object v8, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v8, v8, Lcom/google/common/cache/LocalCache;->valueEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v8, p1, v7}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-result v7
if-eqz v7, :cond_0
.line 2808
const/4 v0, 0x1
.line 2816
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
:goto_2
return v0
.line 2801
:cond_2
add-int/lit8 v0, v2, 0x1
move v2, v0
goto :goto_0
.line 2816
:cond_3
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
move v0, v1
goto :goto_2
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
throw v0
.end method
.method copyEntry(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;)",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
const/4 v0, 0x0
.line 2137
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v1
if-nez v1, :cond_1
.line 2151
:cond_0
:goto_0
return-object v0
.line 2142
:cond_1
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v1
.line 2143
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v2
.line 2144
if-nez v2, :cond_2
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v3
if-nez v3, :cond_0
.line 2149
:cond_2
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->entryFactory:Lcom/google/common/cache/LocalCache$EntryFactory;
invoke-virtual {v0, p0, p1, p2}, Lcom/google/common/cache/LocalCache$EntryFactory;->copyEntry(Lcom/google/common/cache/LocalCache$Segment;Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v0
.line 2150
iget-object v3, p0, Lcom/google/common/cache/LocalCache$Segment;->valueReferenceQueue:Ljava/lang/ref/ReferenceQueue;
invoke-interface {v1, v3, v2, v0}, Lcom/google/common/cache/LocalCache$ValueReference;->copyFor(Ljava/lang/ref/ReferenceQueue;Ljava/lang/Object;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v1
invoke-interface {v0, v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
goto :goto_0
.end method
.method drainKeyReferenceQueue()V
.locals 3
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2484
const/4 v0, 0x0
move v1, v0
.line 2485
:goto_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->keyReferenceQueue:Ljava/lang/ref/ReferenceQueue;
invoke-virtual {v0}, Ljava/lang/ref/ReferenceQueue;->poll()Ljava/lang/ref/Reference;
move-result-object v0
if-eqz v0, :cond_0
.line 2487
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
.line 2488
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v2, v0}, Lcom/google/common/cache/LocalCache;->reclaimKey(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V
.line 2489
add-int/lit8 v0, v1, 0x1
const/16 v1, 0x10
if-ne v0, v1, :cond_1
.line 2493
:cond_0
return-void
:cond_1
move v1, v0
.line 2492
goto :goto_0
.end method
.method drainRecencyQueue()V
.locals 2
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2589
:cond_0
:goto_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->recencyQueue:Ljava/util/Queue;
invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
if-eqz v0, :cond_1
.line 2594
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
invoke-interface {v1, v0}, Ljava/util/Queue;->contains(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_0
.line 2595
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
invoke-interface {v1, v0}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
goto :goto_0
.line 2598
:cond_1
return-void
.end method
.method drainReferenceQueues()V
.locals 1
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2473
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->usesKeyReferences()Z
move-result v0
if-eqz v0, :cond_0
.line 2474
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainKeyReferenceQueue()V
.line 2476
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->usesValueReferences()Z
move-result v0
if-eqz v0, :cond_1
.line 2477
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainValueReferenceQueue()V
.line 2479
:cond_1
return-void
.end method
.method drainValueReferenceQueue()V
.locals 3
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2498
const/4 v0, 0x0
move v1, v0
.line 2499
:goto_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->valueReferenceQueue:Ljava/lang/ref/ReferenceQueue;
invoke-virtual {v0}, Ljava/lang/ref/ReferenceQueue;->poll()Ljava/lang/ref/Reference;
move-result-object v0
if-eqz v0, :cond_0
.line 2501
check-cast v0, Lcom/google/common/cache/LocalCache$ValueReference;
.line 2502
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v2, v0}, Lcom/google/common/cache/LocalCache;->reclaimValue(Lcom/google/common/cache/LocalCache$ValueReference;)V
.line 2503
add-int/lit8 v0, v1, 0x1
const/16 v1, 0x10
if-ne v0, v1, :cond_1
.line 2507
:cond_0
return-void
:cond_1
move v1, v0
.line 2506
goto :goto_0
.end method
.method enqueueNotification(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/RemovalCause;)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;",
"Lcom/google/common/cache/RemovalCause;",
")V"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2637
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v0
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v1
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v2
invoke-virtual {p0, v0, v1, v2, p2}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V
.line 2638
return-void
.end method
.method enqueueNotification(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V
.locals 2
.param p1 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/LocalCache$ValueReference",
"<TK;TV;>;",
"Lcom/google/common/cache/RemovalCause;",
")V"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2643
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->totalWeight:I
invoke-interface {p3}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v1
sub-int/2addr v0, v1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->totalWeight:I
.line 2644
invoke-virtual {p4}, Lcom/google/common/cache/RemovalCause;->wasEvicted()Z
move-result v0
if-eqz v0, :cond_0
.line 2645
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
invoke-interface {v0}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordEviction()V
.line 2647
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->removalNotificationQueue:Ljava/util/Queue;
sget-object v1, Lcom/google/common/cache/LocalCache;->DISCARDING_QUEUE:Ljava/util/Queue;
if-eq v0, v1, :cond_1
.line 2648
invoke-interface {p3}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v0
.line 2649
new-instance v1, Lcom/google/common/cache/RemovalNotification;
invoke-direct {v1, p1, v0, p4}, Lcom/google/common/cache/RemovalNotification;-><init>(Ljava/lang/Object;Ljava/lang/Object;Lcom/google/common/cache/RemovalCause;)V
.line 2650
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->removalNotificationQueue:Ljava/util/Queue;
invoke-interface {v0, v1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z
.line 2652
:cond_1
return-void
.end method
.method evictEntries()V
.locals 4
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2660
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->evictsBySize()Z
move-result v0
if-nez v0, :cond_1
.line 2671
:cond_0
return-void
.line 2664
:cond_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainRecencyQueue()V
.line 2665
:cond_2
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->totalWeight:I
int-to-long v0, v0
iget-wide v2, p0, Lcom/google/common/cache/LocalCache$Segment;->maxSegmentWeight:J
cmp-long v0, v0, v2
if-lez v0, :cond_0
.line 2666
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->getNextEvictable()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v0
.line 2667
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v1
sget-object v2, Lcom/google/common/cache/RemovalCause;->SIZE:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, v0, v1, v2}, Lcom/google/common/cache/LocalCache$Segment;->removeEntry(Lcom/google/common/cache/LocalCache$ReferenceEntry;ILcom/google/common/cache/RemovalCause;)Z
move-result v0
if-nez v0, :cond_2
.line 2668
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
.end method
.method expand()V
.locals 11
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2897
iget-object v7, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2898
invoke-virtual {v7}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v8
.line 2899
const/high16 v0, 0x40000000 # 2.0f
if-lt v8, v0, :cond_0
.line 2962
:goto_0
return-void
.line 2913
:cond_0
iget v5, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 2914
shl-int/lit8 v0, v8, 0x1
invoke-virtual {p0, v0}, Lcom/google/common/cache/LocalCache$Segment;->newEntryArray(I)Ljava/util/concurrent/atomic/AtomicReferenceArray;
move-result-object v9
.line 2915
invoke-virtual {v9}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
mul-int/lit8 v0, v0, 0x3
div-int/lit8 v0, v0, 0x4
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->threshold:I
.line 2916
invoke-virtual {v9}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
add-int/lit8 v10, v0, -0x1
.line 2917
const/4 v0, 0x0
move v6, v0
:goto_1
if-ge v6, v8, :cond_5
.line 2920
invoke-virtual {v7, v6}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
.line 2922
if-eqz v0, :cond_7
.line 2923
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v3
.line 2924
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v1
and-int v2, v1, v10
.line 2927
if-nez v3, :cond_2
.line 2928
invoke-virtual {v9, v2, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
move v1, v5
.line 2917
:cond_1
:goto_2
add-int/lit8 v0, v6, 0x1
move v6, v0
move v5, v1
goto :goto_1
:cond_2
move-object v4, v0
.line 2935
:goto_3
if-eqz v3, :cond_3
.line 2936
invoke-interface {v3}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v1
and-int/2addr v1, v10
.line 2937
if-eq v1, v2, :cond_6
move-object v2, v3
.line 2935
:goto_4
invoke-interface {v3}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v3
move-object v4, v2
move v2, v1
goto :goto_3
.line 2943
:cond_3
invoke-virtual {v9, v2, v4}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
move-object v2, v0
move v1, v5
.line 2946
:goto_5
if-eq v2, v4, :cond_1
.line 2947
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v0
and-int v3, v0, v10
.line 2948
invoke-virtual {v9, v3}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
.line 2949
invoke-virtual {p0, v2, v0}, 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
.line 2950
if-eqz v0, :cond_4
.line 2951
invoke-virtual {v9, v3, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
move v0, v1
.line 2946
:goto_6
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v1
move-object v2, v1
move v1, v0
goto :goto_5
.line 2953
:cond_4
invoke-virtual {p0, v2}, Lcom/google/common/cache/LocalCache$Segment;->removeCollectedEntry(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V
.line 2954
add-int/lit8 v0, v1, -0x1
goto :goto_6
.line 2960
:cond_5
iput-object v9, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2961
iput v5, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
goto :goto_0
:cond_6
move v1, v2
move-object v2, v4
goto :goto_4
:cond_7
move v1, v5
goto :goto_2
.end method
.method expireEntries(J)V
.locals 3
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2618
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainRecencyQueue()V
.line 2621
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
invoke-interface {v0}, Ljava/util/Queue;->peek()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
if-eqz v0, :cond_1
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v1, v0, p1, p2}, Lcom/google/common/cache/LocalCache;->isExpired(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Z
move-result v1
if-eqz v1, :cond_1
.line 2622
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v1
sget-object v2, Lcom/google/common/cache/RemovalCause;->EXPIRED:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, v0, v1, v2}, Lcom/google/common/cache/LocalCache$Segment;->removeEntry(Lcom/google/common/cache/LocalCache$ReferenceEntry;ILcom/google/common/cache/RemovalCause;)Z
move-result v0
if-nez v0, :cond_0
.line 2623
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
.line 2626
:cond_1
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
invoke-interface {v0}, Ljava/util/Queue;->peek()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
if-eqz v0, :cond_2
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v1, v0, p1, p2}, Lcom/google/common/cache/LocalCache;->isExpired(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Z
move-result v1
if-eqz v1, :cond_2
.line 2627
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v1
sget-object v2, Lcom/google/common/cache/RemovalCause;->EXPIRED:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, v0, v1, v2}, Lcom/google/common/cache/LocalCache$Segment;->removeEntry(Lcom/google/common/cache/LocalCache$ReferenceEntry;ILcom/google/common/cache/RemovalCause;)Z
move-result v0
if-nez v0, :cond_1
.line 2628
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
.line 2631
:cond_2
return-void
.end method
.method get(Ljava/lang/Object;I)Ljava/lang/Object;
.locals 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"I)TV;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.prologue
const/4 v0, 0x0
.line 2753
:try_start_0
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
if-eqz v1, :cond_2
.line 2754
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v1, v1, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v1}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v6
.line 2755
invoke-virtual {p0, p1, p2, v6, v7}, Lcom/google/common/cache/LocalCache$Segment;->getLiveEntry(Ljava/lang/Object;IJ)Lcom/google/common/cache/LocalCache$ReferenceEntry;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-result-object v2
.line 2756
if-nez v2, :cond_0
.line 2769
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
:goto_0
return-object v0
.line 2760
:cond_0
:try_start_1
invoke-interface {v2}, 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 v5
.line 2761
if-eqz v5, :cond_1
.line 2762
invoke-virtual {p0, v2, v6, v7}, Lcom/google/common/cache/LocalCache$Segment;->recordRead(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)V
.line 2763
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v3
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v8, v0, Lcom/google/common/cache/LocalCache;->defaultLoader:Lcom/google/common/cache/CacheLoader;
move-object v1, p0
move v4, p2
invoke-virtual/range {v1 .. v8}, Lcom/google/common/cache/LocalCache$Segment;->scheduleRefresh(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;JLcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
move-result-object v0
.line 2769
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
goto :goto_0
.line 2765
:cond_1
:try_start_2
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryDrainReferenceQueues()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 2769
:cond_2
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
goto :goto_0
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
throw v0
.end method
.method get(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
.locals 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/CacheLoader",
"<-TK;TV;>;)TV;"
}
.end annotation
.prologue
.line 2173
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2174
invoke-static {p3}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2176
:try_start_0
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
if-eqz v0, :cond_1
.line 2178
invoke-virtual {p0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->getEntry(Ljava/lang/Object;I)Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v2
.line 2179
if-eqz v2, :cond_1
.line 2180
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v0}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v6
.line 2181
invoke-virtual {p0, v2, v6, v7}, Lcom/google/common/cache/LocalCache$Segment;->getLiveValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Ljava/lang/Object;
move-result-object v5
.line 2182
if-eqz v5, :cond_0
.line 2183
invoke-virtual {p0, v2, v6, v7}, Lcom/google/common/cache/LocalCache$Segment;->recordRead(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)V
.line 2184
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
const/4 v1, 0x1
invoke-interface {v0, v1}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordHits(I)V
move-object v1, p0
move-object v3, p1
move v4, p2
move-object v8, p3
.line 2185
invoke-virtual/range {v1 .. v8}, Lcom/google/common/cache/LocalCache$Segment;->scheduleRefresh(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;JLcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
:try_end_0
.catch Ljava/util/concurrent/ExecutionException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-result-object v0
.line 2205
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
:goto_0
return-object v0
.line 2187
:cond_0
:try_start_1
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
.line 2188
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result v1
if-eqz v1, :cond_1
.line 2189
invoke-virtual {p0, v2, p1, v0}, Lcom/google/common/cache/LocalCache$Segment;->waitForLoadingValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;)Ljava/lang/Object;
:try_end_1
.catch Ljava/util/concurrent/ExecutionException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
move-result-object v0
.line 2205
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
goto :goto_0
.line 2195
:cond_1
:try_start_2
invoke-virtual {p0, p1, p2, p3}, Lcom/google/common/cache/LocalCache$Segment;->lockedGetOrLoad(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
:try_end_2
.catch Ljava/util/concurrent/ExecutionException; {:try_start_2 .. :try_end_2} :catch_0
.catchall {:try_start_2 .. :try_end_2} :catchall_0
move-result-object v0
.line 2205
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
goto :goto_0
.line 2196
:catch_0
move-exception v0
move-object v1, v0
.line 2197
:try_start_3
invoke-virtual {v1}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object v0
.line 2198
instance-of v2, v0, Ljava/lang/Error;
if-eqz v2, :cond_2
.line 2199
new-instance v1, Lcom/google/common/util/concurrent/ExecutionError;
check-cast v0, Ljava/lang/Error;
invoke-direct {v1, v0}, Lcom/google/common/util/concurrent/ExecutionError;-><init>(Ljava/lang/Error;)V
throw v1
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
.line 2205
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
throw v0
.line 2200
:cond_2
:try_start_4
instance-of v2, v0, Ljava/lang/RuntimeException;
if-eqz v2, :cond_3
.line 2201
new-instance v1, Lcom/google/common/util/concurrent/UncheckedExecutionException;
invoke-direct {v1, v0}, Lcom/google/common/util/concurrent/UncheckedExecutionException;-><init>(Ljava/lang/Throwable;)V
throw v1
.line 2203
:cond_3
throw v1
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
.end method
.method getAndRecordStats(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/util/concurrent/ListenableFuture;)Ljava/lang/Object;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/LocalCache$LoadingValueReference",
"<TK;TV;>;",
"Lcom/google/common/util/concurrent/ListenableFuture",
"<TV;>;)TV;"
}
.end annotation
.prologue
.line 2344
const/4 v1, 0x0
.line 2346
:try_start_0
invoke-static {p4}, Lcom/google/common/util/concurrent/Uninterruptibles;->getUninterruptibly(Ljava/util/concurrent/Future;)Ljava/lang/Object;
move-result-object v1
.line 2347
if-nez v1, :cond_1
.line 2348
new-instance v0, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "CacheLoader returned null for key "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, "."
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v0, v2}, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2354
:catchall_0
move-exception v0
if-nez v1, :cond_0
.line 2355
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
invoke-virtual {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->elapsedNanos()J
move-result-wide v2
invoke-interface {v1, v2, v3}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordLoadException(J)V
.line 2356
invoke-virtual {p0, p1, p2, p3}, Lcom/google/common/cache/LocalCache$Segment;->removeLoadingValue(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;)Z
:cond_0
throw v0
.line 2350
:cond_1
:try_start_1
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
invoke-virtual {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->elapsedNanos()J
move-result-wide v2
invoke-interface {v0, v2, v3}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordLoadSuccess(J)V
.line 2351
invoke-virtual {p0, p1, p2, p3, v1}, Lcom/google/common/cache/LocalCache$Segment;->storeLoadedValue(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Ljava/lang/Object;)Z
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 2354
if-nez v1, :cond_2
.line 2355
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
invoke-virtual {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->elapsedNanos()J
move-result-wide v2
invoke-interface {v0, v2, v3}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordLoadException(J)V
.line 2356
invoke-virtual {p0, p1, p2, p3}, Lcom/google/common/cache/LocalCache$Segment;->removeLoadingValue(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;)Z
:cond_2
return-object v1
.end method
.method getEntry(Ljava/lang/Object;I)Lcom/google/common/cache/LocalCache$ReferenceEntry;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"I)",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.prologue
.line 2697
invoke-virtual {p0, p2}, Lcom/google/common/cache/LocalCache$Segment;->getFirst(I)Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v0
:goto_0
if-eqz v0, :cond_3
.line 2698
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v1
if-eq v1, p2, :cond_1
.line 2697
:cond_0
:goto_1
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v0
goto :goto_0
.line 2702
:cond_1
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v1
.line 2703
if-nez v1, :cond_2
.line 2704
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryDrainReferenceQueues()V
goto :goto_1
.line 2708
:cond_2
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v2, v2, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v2, p1, v1}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_0
.line 2713
:goto_2
return-object v0
:cond_3
const/4 v0, 0x0
goto :goto_2
.end method
.method getFirst(I)Lcom/google/common/cache/LocalCache$ReferenceEntry;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;"
}
.end annotation
.prologue
.line 2689
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2690
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
add-int/lit8 v1, v1, -0x1
and-int/2addr v1, p1
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
return-object v0
.end method
.method getLiveEntry(Ljava/lang/Object;IJ)Lcom/google/common/cache/LocalCache$ReferenceEntry;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"IJ)",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.prologue
const/4 v0, 0x0
.line 2718
invoke-virtual {p0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->getEntry(Ljava/lang/Object;I)Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v1
.line 2719
if-nez v1, :cond_0
.line 2725
:goto_0
return-object v0
.line 2721
:cond_0
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v2, v1, p3, p4}, Lcom/google/common/cache/LocalCache;->isExpired(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Z
move-result v2
if-eqz v2, :cond_1
.line 2722
invoke-virtual {p0, p3, p4}, Lcom/google/common/cache/LocalCache$Segment;->tryExpireEntries(J)V
goto :goto_0
:cond_1
move-object v0, v1
.line 2725
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",
"<TK;TV;>;J)TV;"
}
.end annotation
.prologue
const/4 v0, 0x0
.line 2733
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v1
if-nez v1, :cond_0
.line 2734
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryDrainReferenceQueues()V
.line 2747
:goto_0
return-object v0
.line 2737
:cond_0
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 2738
if-nez v1, :cond_1
.line 2739
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryDrainReferenceQueues()V
goto :goto_0
.line 2743
:cond_1
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v2, p1, p2, p3}, Lcom/google/common/cache/LocalCache;->isExpired(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Z
move-result v2
if-eqz v2, :cond_2
.line 2744
invoke-virtual {p0, p2, p3}, Lcom/google/common/cache/LocalCache$Segment;->tryExpireEntries(J)V
goto :goto_0
:cond_2
move-object v0, v1
.line 2747
goto :goto_0
.end method
.method getNextEvictable()Lcom/google/common/cache/LocalCache$ReferenceEntry;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;"
}
.end annotation
.prologue
.line 2675
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
invoke-interface {v0}, Ljava/util/Queue;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_1
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
.line 2676
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v2
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v2
.line 2677
if-lez v2, :cond_0
.line 2678
return-object v0
.line 2681
:cond_1
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
.end method
.method initTable(Ljava/util/concurrent/atomic/AtomicReferenceArray;)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/concurrent/atomic/AtomicReferenceArray",
"<",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;>;)V"
}
.end annotation
.prologue
.line 2118
invoke-virtual {p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
mul-int/lit8 v0, v0, 0x3
div-int/lit8 v0, v0, 0x4
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->threshold:I
.line 2119
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->customWeigher()Z
move-result v0
if-nez v0, :cond_0
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->threshold:I
int-to-long v0, v0
iget-wide v2, p0, Lcom/google/common/cache/LocalCache$Segment;->maxSegmentWeight:J
cmp-long v0, v0, v2
if-nez v0, :cond_0
.line 2121
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->threshold:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->threshold:I
.line 2123
:cond_0
iput-object p1, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2124
return-void
.end method
.method insertLoadingValueReference(Ljava/lang/Object;IZ)Lcom/google/common/cache/LocalCache$LoadingValueReference;
.locals 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;IZ)",
"Lcom/google/common/cache/LocalCache$LoadingValueReference",
"<TK;TV;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.prologue
.line 2405
.line 2406
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 2408
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v0}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v2
.line 2409
invoke-virtual {p0, v2, v3}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
.line 2411
iget-object v4, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2412
invoke-virtual {v4}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
and-int v5, p2, v0
.line 2413
invoke-virtual {v4, v5}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v1, v0
.line 2416
:goto_0
if-eqz v1, :cond_3
.line 2417
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v6
.line 2418
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v7
if-ne v7, p2, :cond_2
if-eqz v6, :cond_2
iget-object v7, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v7, v7, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v7, p1, v6}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_2
.line 2422
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v4
.line 2423
invoke-interface {v4}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result v0
if-nez v0, :cond_0
if-eqz p3, :cond_1
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getWriteTime()J
move-result-wide v6
sub-long/2addr v2, v6
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-wide v6, v0, Lcom/google/common/cache/LocalCache;->refreshNanos:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
cmp-long v0, v2, v6
if-gez v0, :cond_1
.line 2428
:cond_0
const/4 v0, 0x0
.line 2447
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2448
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
:goto_1
return-object v0
.line 2432
:cond_1
:try_start_1
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2433
new-instance v0, Lcom/google/common/cache/LocalCache$LoadingValueReference;
invoke-direct {v0, v4}, Lcom/google/common/cache/LocalCache$LoadingValueReference;-><init>(Lcom/google/common/cache/LocalCache$ValueReference;)V
.line 2435
invoke-interface {v1, v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 2447
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2448
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_1
.line 2416
:cond_2
:try_start_2
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v1
goto :goto_0
.line 2440
:cond_3
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v1, v1, 0x1
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2441
new-instance v1, Lcom/google/common/cache/LocalCache$LoadingValueReference;
invoke-direct {v1}, Lcom/google/common/cache/LocalCache$LoadingValueReference;-><init>()V
.line 2442
invoke-virtual {p0, p1, p2, v0}, 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
.line 2443
invoke-interface {v0, v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
.line 2444
invoke-virtual {v4, v5, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 2447
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2448
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move-object v0, v1
goto :goto_1
.line 2447
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2448
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
throw v0
.end method
.method loadAsync(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/cache/CacheLoader;)Lcom/google/common/util/concurrent/ListenableFuture;
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/LocalCache$LoadingValueReference",
"<TK;TV;>;",
"Lcom/google/common/cache/CacheLoader",
"<-TK;TV;>;)",
"Lcom/google/common/util/concurrent/ListenableFuture",
"<TV;>;"
}
.end annotation
.prologue
.line 2323
invoke-virtual {p3, p1, p4}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->loadFuture(Ljava/lang/Object;Lcom/google/common/cache/CacheLoader;)Lcom/google/common/util/concurrent/ListenableFuture;
move-result-object v5
.line 2324
new-instance v0, Lcom/google/common/cache/LocalCache$Segment$1;
move-object v1, p0
move-object v2, p1
move v3, p2
move-object v4, p3
invoke-direct/range {v0 .. v5}, Lcom/google/common/cache/LocalCache$Segment$1;-><init>(Lcom/google/common/cache/LocalCache$Segment;Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/util/concurrent/ListenableFuture;)V
sget-object v1, Lcom/google/common/cache/LocalCache;->sameThreadExecutor:Lcom/google/common/util/concurrent/ListeningExecutorService;
invoke-interface {v5, v0, v1}, Lcom/google/common/util/concurrent/ListenableFuture;->addListener(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V
.line 2336
return-object v5
.end method
.method loadSync(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/LocalCache$LoadingValueReference",
"<TK;TV;>;",
"Lcom/google/common/cache/CacheLoader",
"<-TK;TV;>;)TV;"
}
.end annotation
.prologue
.line 2317
invoke-virtual {p3, p1, p4}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->loadFuture(Ljava/lang/Object;Lcom/google/common/cache/CacheLoader;)Lcom/google/common/util/concurrent/ListenableFuture;
move-result-object v0
.line 2318
invoke-virtual {p0, p1, p2, p3, v0}, Lcom/google/common/cache/LocalCache$Segment;->getAndRecordStats(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/util/concurrent/ListenableFuture;)Ljava/lang/Object;
move-result-object v0
return-object v0
.end method
.method lockedGetOrLoad(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
.locals 18
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/CacheLoader",
"<-TK;TV;>;)TV;"
}
.end annotation
.prologue
.line 2212
const/4 v7, 0x0
.line 2213
const/4 v5, 0x0
.line 2214
const/4 v8, 0x1
.line 2216
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 2219
:try_start_0
move-object/from16 v0, p0
iget-object v4, v0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v4, v4, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v4}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v10
.line 2220
move-object/from16 v0, p0
invoke-virtual {v0, v10, v11}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
.line 2222
move-object/from16 v0, p0
iget v4, v0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v12, v4, -0x1
.line 2223
move-object/from16 v0, p0
iget-object v13, v0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2224
invoke-virtual {v13}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v4
add-int/lit8 v4, v4, -0x1
and-int v14, p2, v4
.line 2225
invoke-virtual {v13, v14}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v6, v4
.line 2227
:goto_0
if-eqz v6, :cond_7
.line 2228
invoke-interface {v6}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v15
.line 2229
invoke-interface {v6}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v9
move/from16 v0, p2
if-ne v9, v0, :cond_3
if-eqz v15, :cond_3
move-object/from16 v0, p0
iget-object v9, v0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v9, v9, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
move-object/from16 v0, p1
invoke-virtual {v9, v0, v15}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v9
if-eqz v9, :cond_3
.line 2231
invoke-interface {v6}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v9
.line 2232
invoke-interface {v9}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result v7
if-eqz v7, :cond_0
.line 2233
const/4 v7, 0x0
move-object v8, v9
.line 2258
:goto_1
if-eqz v7, :cond_6
.line 2259
new-instance v5, Lcom/google/common/cache/LocalCache$LoadingValueReference;
invoke-direct {v5}, Lcom/google/common/cache/LocalCache$LoadingValueReference;-><init>()V
.line 2261
if-nez v6, :cond_4
.line 2262
move-object/from16 v0, p0
move-object/from16 v1, p1
move/from16 v2, p2
invoke-virtual {v0, v1, v2, v4}, 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 v4
.line 2263
invoke-interface {v4, v5}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
.line 2264
invoke-virtual {v13, v14, v4}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-object/from16 v17, v5
move-object v5, v4
move-object/from16 v4, v17
.line 2270
:goto_2
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2271
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 2274
if-eqz v7, :cond_5
.line 2279
:try_start_1
monitor-enter v5
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_2
.line 2280
:try_start_2
move-object/from16 v0, p0
move-object/from16 v1, p1
move/from16 v2, p2
move-object/from16 v3, p3
invoke-virtual {v0, v1, v2, v4, v3}, Lcom/google/common/cache/LocalCache$Segment;->loadSync(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
move-result-object v4
monitor-exit v5
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
.line 2283
move-object/from16 v0, p0
iget-object v5, v0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
const/4 v6, 0x1
invoke-interface {v5, v6}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V
.line 2287
:goto_3
return-object v4
.line 2235
:cond_0
:try_start_3
invoke-interface {v9}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v7
.line 2236
if-nez v7, :cond_1
.line 2237
sget-object v7, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object/from16 v0, p0
move/from16 v1, p2
invoke-virtual {v0, v15, v1, v9, v7}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V
.line 2250
:goto_4
move-object/from16 v0, p0
iget-object v7, v0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
invoke-interface {v7, v6}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
.line 2251
move-object/from16 v0, p0
iget-object v7, v0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
invoke-interface {v7, v6}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
.line 2252
move-object/from16 v0, p0
iput v12, v0, Lcom/google/common/cache/LocalCache$Segment;->count:I
move v7, v8
move-object v8, v9
.line 2254
goto :goto_1
.line 2238
:cond_1
move-object/from16 v0, p0
iget-object v0, v0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
move-object/from16 v16, v0
move-object/from16 v0, v16
invoke-virtual {v0, v6, v10, v11}, Lcom/google/common/cache/LocalCache;->isExpired(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)Z
move-result v16
if-eqz v16, :cond_2
.line 2241
sget-object v7, Lcom/google/common/cache/RemovalCause;->EXPIRED:Lcom/google/common/cache/RemovalCause;
move-object/from16 v0, p0
move/from16 v1, p2
invoke-virtual {v0, v15, v1, v9, v7}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
goto :goto_4
.line 2270
:catchall_0
move-exception v4
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2271
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
throw v4
.line 2243
:cond_2
:try_start_4
move-object/from16 v0, p0
invoke-virtual {v0, v6, v10, v11}, Lcom/google/common/cache/LocalCache$Segment;->recordLockedRead(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)V
.line 2244
move-object/from16 v0, p0
iget-object v4, v0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
const/4 v5, 0x1
invoke-interface {v4, v5}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordHits(I)V
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
.line 2270
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2271
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move-object v4, v7
goto :goto_3
.line 2227
:cond_3
:try_start_5
invoke-interface {v6}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v6
goto/16 :goto_0
.line 2266
:cond_4
invoke-interface {v6, v5}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_0
move-object v4, v5
move-object v5, v6
goto/16 :goto_2
.line 2281
:catchall_1
move-exception v4
:try_start_6
monitor-exit v5
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_1
:try_start_7
throw v4
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_2
.line 2283
:catchall_2
move-exception v4
move-object/from16 v0, p0
iget-object v5, v0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
const/4 v6, 0x1
invoke-interface {v5, v6}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V
throw v4
.line 2287
:cond_5
move-object/from16 v0, p0
move-object/from16 v1, p1
invoke-virtual {v0, v5, v1, v8}, Lcom/google/common/cache/LocalCache$Segment;->waitForLoadingValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;)Ljava/lang/Object;
move-result-object v4
goto :goto_3
:cond_6
move-object v4, v5
move-object v5, v6
goto/16 :goto_2
:cond_7
move/from16 v17, v8
move-object v8, v7
move/from16 v7, v17
goto/16 :goto_1
.end method
.method newEntry(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry;
.locals 2
.param p3 # Lcom/google/common/cache/LocalCache$ReferenceEntry;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;)",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2128
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->entryFactory:Lcom/google/common/cache/LocalCache$EntryFactory;
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
invoke-virtual {v0, p0, v1, p2, p3}, Lcom/google/common/cache/LocalCache$EntryFactory;->newEntry(Lcom/google/common/cache/LocalCache$Segment;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 newEntryArray(I)Ljava/util/concurrent/atomic/AtomicReferenceArray;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Ljava/util/concurrent/atomic/AtomicReferenceArray",
"<",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;>;"
}
.end annotation
.prologue
.line 2114
new-instance v0, Ljava/util/concurrent/atomic/AtomicReferenceArray;
invoke-direct {v0, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;-><init>(I)V
return-object v0
.end method
.method postReadCleanup()V
.locals 1
.prologue
.line 3413
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->readCount:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->incrementAndGet()I
move-result v0
and-int/lit8 v0, v0, 0x3f
if-nez v0, :cond_0
.line 3414
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->cleanUp()V
.line 3416
:cond_0
return-void
.end method
.method postWriteCleanup()V
.locals 0
.prologue
.line 3433
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->runUnlockedCleanup()V
.line 3434
return-void
.end method
.method preWriteCleanup(J)V
.locals 1
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 3426
invoke-virtual {p0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->runLockedCleanup(J)V
.line 3427
return-void
.end method
.method put(Ljava/lang/Object;ILjava/lang/Object;Z)Ljava/lang/Object;
.locals 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;ITV;Z)TV;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.prologue
const/4 v6, 0x0
.line 2822
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 2824
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v0}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v4
.line 2825
invoke-virtual {p0, v4, v5}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
.line 2827
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v0, v0, 0x1
.line 2828
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->threshold:I
if-le v0, v1, :cond_0
.line 2829
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->expand()V
.line 2830
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v0, v0, 0x1
.line 2833
:cond_0
iget-object v7, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2834
invoke-virtual {v7}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
and-int v8, p2, v0
.line 2835
invoke-virtual {v7, v8}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v1, v0
.line 2838
:goto_0
if-eqz v1, :cond_5
.line 2839
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v2
.line 2840
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v3
if-ne v3, p2, :cond_4
if-eqz v2, :cond_4
iget-object v3, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v3, v3, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v3, p1, v2}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_4
.line 2844
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
.line 2845
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v7
.line 2847
if-nez v7, :cond_2
.line 2848
iget v2, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v2, v2, 0x1
iput v2, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2849
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v2
if-eqz v2, :cond_1
.line 2850
sget-object v2, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, p1, p2, v0, v2}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V
move-object v0, p0
move-object v2, p1
move-object v3, p3
.line 2851
invoke-virtual/range {v0 .. v5}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 2852
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 2857
:goto_1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 2858
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2887
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2888
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move-object v0, v6
:goto_2
return-object v0
:cond_1
move-object v0, p0
move-object v2, p1
move-object v3, p3
.line 2854
:try_start_1
invoke-virtual/range {v0 .. v5}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 2855
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v0, v0, 0x1
goto :goto_1
.line 2860
:cond_2
if-eqz p4, :cond_3
.line 2864
invoke-virtual {p0, v1, v4, v5}, Lcom/google/common/cache/LocalCache$Segment;->recordLockedRead(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 2887
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2888
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move-object v0, v7
goto :goto_2
.line 2868
:cond_3
:try_start_2
iget v2, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v2, v2, 0x1
iput v2, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2869
sget-object v2, Lcom/google/common/cache/RemovalCause;->REPLACED:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, p1, p2, v0, v2}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V
move-object v0, p0
move-object v2, p1
move-object v3, p3
.line 2870
invoke-virtual/range {v0 .. v5}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 2871
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 2887
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2888
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move-object v0, v7
goto :goto_2
.line 2838
:cond_4
:try_start_3
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v1
goto :goto_0
.line 2878
:cond_5
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v1, v1, 0x1
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2879
invoke-virtual {p0, p1, p2, v0}, 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 v1
move-object v0, p0
move-object v2, p1
move-object v3, p3
.line 2880
invoke-virtual/range {v0 .. v5}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 2881
invoke-virtual {v7, v8, v1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
.line 2882
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v0, v0, 0x1
.line 2883
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 2884
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries()V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
.line 2887
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2888
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move-object v0, v6
goto :goto_2
.line 2887
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2888
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
throw v0
.end method
.method reclaimKey(Lcom/google/common/cache/LocalCache$ReferenceEntry;I)Z
.locals 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;I)Z"
}
.end annotation
.prologue
.line 3290
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 3292
:try_start_0
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v0, v0, -0x1
.line 3293
iget-object v7, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3294
invoke-virtual {v7}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
and-int v8, p2, v0
.line 3295
invoke-virtual {v7, v8}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v2, v1
.line 3297
:goto_0
if-eqz v2, :cond_1
.line 3298
if-ne v2, p1, :cond_0
.line 3299
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3300
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v3
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v5
sget-object v6, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object v0, p0
move v4, p2
invoke-virtual/range {v0 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->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;
move-result-object v0
.line 3302
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v1, v1, -0x1
.line 3303
invoke-virtual {v7, v8, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
.line 3304
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3305
const/4 v0, 0x1
.line 3311
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3312
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
:goto_1
return v0
.line 3297
:cond_0
:try_start_1
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
move-result-object v2
goto :goto_0
.line 3309
:cond_1
const/4 v0, 0x0
.line 3311
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3312
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_1
.line 3311
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3312
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
throw v0
.end method
.method reclaimValue(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;)Z
.locals 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/LocalCache$ValueReference",
"<TK;TV;>;)Z"
}
.end annotation
.prologue
const/4 v0, 0x0
.line 3320
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 3322
:try_start_0
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v1, v1, -0x1
.line 3323
iget-object v7, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3324
invoke-virtual {v7}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
add-int/lit8 v1, v1, -0x1
and-int v8, p2, v1
.line 3325
invoke-virtual {v7, v8}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v2, v1
.line 3327
:goto_0
if-eqz v2, :cond_3
.line 3328
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v3
.line 3329
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v4
if-ne v4, p2, :cond_2
if-eqz v3, :cond_2
iget-object v4, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v4, v4, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v4, p1, v3}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_2
.line 3331
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v4
.line 3332
if-ne v4, p3, :cond_1
.line 3333
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3334
sget-object v6, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object v0, p0
move v4, p2
move-object v5, p3
invoke-virtual/range {v0 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->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;
move-result-object v0
.line 3336
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v1, v1, -0x1
.line 3337
invoke-virtual {v7, v8, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
.line 3338
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3339
const/4 v0, 0x1
.line 3347
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3348
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->isHeldByCurrentThread()Z
move-result v1
if-nez v1, :cond_0
.line 3349
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
:cond_0
:goto_1
return v0
.line 3347
:cond_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3348
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->isHeldByCurrentThread()Z
move-result v1
if-nez v1, :cond_0
.line 3349
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_1
.line 3327
:cond_2
:try_start_1
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
move-result-object v2
goto :goto_0
.line 3347
:cond_3
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3348
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->isHeldByCurrentThread()Z
move-result v1
if-nez v1, :cond_0
.line 3349
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_1
.line 3347
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3348
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->isHeldByCurrentThread()Z
move-result v1
if-nez v1, :cond_4
.line 3349
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
:cond_4
throw v0
.end method
.method recordLockedRead(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;J)V"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2554
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->recordsAccess()Z
move-result v0
if-eqz v0, :cond_0
.line 2555
invoke-interface {p1, p2, p3}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setAccessTime(J)V
.line 2557
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
invoke-interface {v0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
.line 2558
return-void
.end method
.method recordRead(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;J)V"
}
.end annotation
.prologue
.line 2539
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->recordsAccess()Z
move-result v0
if-eqz v0, :cond_0
.line 2540
invoke-interface {p1, p2, p3}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setAccessTime(J)V
.line 2542
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->recencyQueue:Ljava/util/Queue;
invoke-interface {v0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
.line 2543
return-void
.end method
.method recordWrite(Lcom/google/common/cache/LocalCache$ReferenceEntry;IJ)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;IJ)V"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2567
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainRecencyQueue()V
.line 2568
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->totalWeight:I
add-int/2addr v0, p2
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->totalWeight:I
.line 2570
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->recordsAccess()Z
move-result v0
if-eqz v0, :cond_0
.line 2571
invoke-interface {p1, p3, p4}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setAccessTime(J)V
.line 2573
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->recordsWrite()Z
move-result v0
if-eqz v0, :cond_1
.line 2574
invoke-interface {p1, p3, p4}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setWriteTime(J)V
.line 2576
:cond_1
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
invoke-interface {v0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
.line 2577
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
invoke-interface {v0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
.line 2578
return-void
.end method
.method refresh(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;Z)Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/CacheLoader",
"<-TK;TV;>;Z)TV;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.prologue
const/4 v0, 0x0
.line 2381
invoke-virtual {p0, p1, p2, p4}, Lcom/google/common/cache/LocalCache$Segment;->insertLoadingValueReference(Ljava/lang/Object;IZ)Lcom/google/common/cache/LocalCache$LoadingValueReference;
move-result-object v1
.line 2383
if-nez v1, :cond_1
.line 2395
:cond_0
:goto_0
return-object v0
.line 2387
:cond_1
invoke-virtual {p0, p1, p2, v1, p3}, Lcom/google/common/cache/LocalCache$Segment;->loadAsync(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/cache/CacheLoader;)Lcom/google/common/util/concurrent/ListenableFuture;
move-result-object v1
.line 2388
invoke-interface {v1}, Lcom/google/common/util/concurrent/ListenableFuture;->isDone()Z
move-result v2
if-eqz v2, :cond_0
.line 2390
:try_start_0
invoke-static {v1}, Lcom/google/common/util/concurrent/Uninterruptibles;->getUninterruptibly(Ljava/util/concurrent/Future;)Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v0
goto :goto_0
.line 2391
:catch_0
move-exception v1
goto :goto_0
.end method
.method remove(Ljava/lang/Object;I)Ljava/lang/Object;
.locals 10
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"I)TV;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.prologue
const/4 v0, 0x0
.line 3064
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 3066
:try_start_0
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v1, v1, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v1}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v2
.line 3067
invoke-virtual {p0, v2, v3}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
.line 3069
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v1, v1, -0x1
.line 3070
iget-object v8, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3071
invoke-virtual {v8}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
add-int/lit8 v1, v1, -0x1
and-int v9, p2, v1
.line 3072
invoke-virtual {v8, v9}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v2, v1
.line 3074
:goto_0
if-eqz v2, :cond_3
.line 3075
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v3
.line 3076
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v4
if-ne v4, p2, :cond_2
if-eqz v3, :cond_2
iget-object v4, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v4, v4, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v4, p1, v3}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_2
.line 3078
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v5
.line 3079
invoke-interface {v5}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v7
.line 3082
if-eqz v7, :cond_0
.line 3083
sget-object v6, Lcom/google/common/cache/RemovalCause;->EXPLICIT:Lcom/google/common/cache/RemovalCause;
.line 3091
:goto_1
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
move-object v0, p0
move v4, p2
.line 3092
invoke-virtual/range {v0 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->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;
move-result-object v0
.line 3094
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v1, v1, -0x1
.line 3095
invoke-virtual {v8, v9, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
.line 3096
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3103
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3104
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move-object v0, v7
:goto_2
return-object v0
.line 3084
:cond_0
:try_start_1
invoke-interface {v5}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v4
if-eqz v4, :cond_1
.line 3085
sget-object v6, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_1
.line 3103
:cond_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3104
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_2
.line 3074
:cond_2
:try_start_2
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
move-result-object v2
goto :goto_0
.line 3103
:cond_3
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3104
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_2
.line 3103
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3104
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
throw v0
.end method
.method remove(Ljava/lang/Object;ILjava/lang/Object;)Z
.locals 10
.prologue
const/4 v7, 0x0
.line 3169
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 3171
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v0}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v0
.line 3172
invoke-virtual {p0, v0, v1}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
.line 3174
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v0, v0, -0x1
.line 3175
iget-object v8, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3176
invoke-virtual {v8}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
and-int v9, p2, v0
.line 3177
invoke-virtual {v8, v9}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v2, v1
.line 3179
:goto_0
if-eqz v2, :cond_4
.line 3180
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v3
.line 3181
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v0
if-ne v0, p2, :cond_3
if-eqz v3, :cond_3
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v0, p1, v3}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3
.line 3183
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v5
.line 3184
invoke-interface {v5}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v0
.line 3187
iget-object v4, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v4, v4, Lcom/google/common/cache/LocalCache;->valueEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v4, p3, v0}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_0
.line 3188
sget-object v6, Lcom/google/common/cache/RemovalCause;->EXPLICIT:Lcom/google/common/cache/RemovalCause;
.line 3196
:goto_1
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
move-object v0, p0
move v4, p2
.line 3197
invoke-virtual/range {v0 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->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;
move-result-object v0
.line 3199
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v1, v1, -0x1
.line 3200
invoke-virtual {v8, v9, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
.line 3201
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 3202
sget-object v0, Lcom/google/common/cache/RemovalCause;->EXPLICIT:Lcom/google/common/cache/RemovalCause;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-ne v6, v0, :cond_2
const/4 v0, 0x1
.line 3208
:goto_2
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3209
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move v7, v0
:goto_3
return v7
.line 3189
:cond_0
if-nez v0, :cond_1
:try_start_1
invoke-interface {v5}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v0
if-eqz v0, :cond_1
.line 3190
sget-object v6, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_1
.line 3208
:cond_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3209
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_3
:cond_2
move v0, v7
.line 3202
goto :goto_2
.line 3179
:cond_3
:try_start_2
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
move-result-object v2
goto :goto_0
.line 3208
:cond_4
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3209
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_3
.line 3208
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3209
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
throw v0
.end method
.method removeCollectedEntry(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;)V"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 3281
sget-object v0, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, p1, v0}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/RemovalCause;)V
.line 3282
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
invoke-interface {v0, p1}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
.line 3283
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
invoke-interface {v0, p1}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
.line 3284
return-void
.end method
.method removeEntry(Lcom/google/common/cache/LocalCache$ReferenceEntry;ILcom/google/common/cache/RemovalCause;)Z
.locals 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;I",
"Lcom/google/common/cache/RemovalCause;",
")Z"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 3388
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v0, v0, -0x1
.line 3389
iget-object v7, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3390
invoke-virtual {v7}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
and-int v8, p2, v0
.line 3391
invoke-virtual {v7, v8}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v2, v1
.line 3393
:goto_0
if-eqz v2, :cond_1
.line 3394
if-ne v2, p1, :cond_0
.line 3395
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3396
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v3
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v5
move-object v0, p0
move v4, p2
move-object v6, p3
invoke-virtual/range {v0 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->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;
move-result-object v0
.line 3398
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v1, v1, -0x1
.line 3399
invoke-virtual {v7, v8, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
.line 3400
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 3401
const/4 v0, 0x1
.line 3405
:goto_1
return v0
.line 3393
:cond_0
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v2
goto :goto_0
.line 3405
:cond_1
const/4 v0, 0x0
goto :goto_1
.end method
.method removeEntryFromChain(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;)",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 3264
iget v2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 3265
invoke-interface {p2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v1
.line 3266
:goto_0
if-eq p1, p2, :cond_1
.line 3267
invoke-virtual {p0, p1, v1}, 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
.line 3268
if-eqz v0, :cond_0
move v1, v2
.line 3266
:goto_1
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object p1
move v2, v1
move-object v1, v0
goto :goto_0
.line 3271
:cond_0
invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache$Segment;->removeCollectedEntry(Lcom/google/common/cache/LocalCache$ReferenceEntry;)V
.line 3272
add-int/lit8 v0, v2, -0x1
move-object v3, v1
move v1, v0
move-object v0, v3
goto :goto_1
.line 3275
:cond_1
iput v2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 3276
return-object v1
.end method
.method removeLoadingValue(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;)Z
.locals 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/LocalCache$LoadingValueReference",
"<TK;TV;>;)Z"
}
.end annotation
.prologue
const/4 v1, 0x0
.line 3355
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 3357
:try_start_0
iget-object v3, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3358
invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
and-int v4, p2, v0
.line 3359
invoke-virtual {v3, v4}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v2, v0
.line 3361
:goto_0
if-eqz v2, :cond_3
.line 3362
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v5
.line 3363
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v6
if-ne v6, p2, :cond_2
if-eqz v5, :cond_2
iget-object v6, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v6, v6, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v6, p1, v5}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_2
.line 3365
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v5
.line 3366
if-ne v5, p3, :cond_1
.line 3367
invoke-virtual {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->isActive()Z
move-result v1
if-eqz v1, :cond_0
.line 3368
invoke-virtual {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->getOldValue()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
invoke-interface {v2, v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3373
:goto_1
const/4 v0, 0x1
.line 3381
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3382
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
:goto_2
return v0
.line 3370
:cond_0
:try_start_1
invoke-virtual {p0, v0, v2}, Lcom/google/common/cache/LocalCache$Segment;->removeEntryFromChain(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v0
.line 3371
invoke-virtual {v3, v4, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_1
.line 3381
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3382
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
throw v0
.line 3381
:cond_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3382
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move v0, v1
goto :goto_2
.line 3361
:cond_2
:try_start_2
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
move-result-object v2
goto :goto_0
.line 3381
:cond_3
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3382
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move v0, v1
goto :goto_2
.end method
.method 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;
.locals 1
.param p3 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;TK;I",
"Lcom/google/common/cache/LocalCache$ValueReference",
"<TK;TV;>;",
"Lcom/google/common/cache/RemovalCause;",
")",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 3248
invoke-virtual {p0, p3, p4, p5, p6}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V
.line 3249
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
invoke-interface {v0, p2}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
.line 3250
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
invoke-interface {v0, p2}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
.line 3252
invoke-interface {p5}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result v0
if-eqz v0, :cond_0
.line 3253
const/4 v0, 0x0
invoke-interface {p5, v0}, Lcom/google/common/cache/LocalCache$ValueReference;->notifyNewValue(Ljava/lang/Object;)V
.line 3256
:goto_0
return-object p1
:cond_0
invoke-virtual {p0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->removeEntryFromChain(Lcom/google/common/cache/LocalCache$ReferenceEntry;Lcom/google/common/cache/LocalCache$ReferenceEntry;)Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object p1
goto :goto_0
.end method
.method replace(Ljava/lang/Object;ILjava/lang/Object;)Ljava/lang/Object;
.locals 12
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;ITV;)TV;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.prologue
const/4 v7, 0x0
.line 3018
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 3020
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v0}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v8
.line 3021
invoke-virtual {p0, v8, v9}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
.line 3023
iget-object v10, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3024
invoke-virtual {v10}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
and-int v11, p2, v0
.line 3025
invoke-virtual {v10, v11}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v2, v1
.line 3027
:goto_0
if-eqz v2, :cond_3
.line 3028
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v3
.line 3029
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v0
if-ne v0, p2, :cond_2
if-eqz v3, :cond_2
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v0, p1, v3}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2
.line 3031
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v5
.line 3032
invoke-interface {v5}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v0
.line 3033
if-nez v0, :cond_1
.line 3034
invoke-interface {v5}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v0
if-eqz v0, :cond_0
.line 3036
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v0, v0, -0x1
.line 3037
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3038
sget-object v6, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object v0, p0
move v4, p2
invoke-virtual/range {v0 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->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;
move-result-object v0
.line 3040
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v1, v1, -0x1
.line 3041
invoke-virtual {v10, v11, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
.line 3042
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3057
:cond_0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3058
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move-object v0, v7
:goto_1
return-object v0
.line 3047
:cond_1
:try_start_1
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v1, v1, 0x1
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3048
sget-object v1, Lcom/google/common/cache/RemovalCause;->REPLACED:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, p1, p2, v5, v1}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V
move-object v1, p0
move-object v3, p1
move-object v4, p3
move-wide v5, v8
.line 3049
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 3050
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 3057
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3058
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_1
.line 3027
:cond_2
:try_start_2
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
move-result-object v2
goto :goto_0
.line 3057
:cond_3
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3058
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move-object v0, v7
goto :goto_1
.line 3057
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3058
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
throw v0
.end method
.method replace(Ljava/lang/Object;ILjava/lang/Object;Ljava/lang/Object;)Z
.locals 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;ITV;TV;)Z"
}
.end annotation
.prologue
.line 2965
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 2967
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v0}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v8
.line 2968
invoke-virtual {p0, v8, v9}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
.line 2970
iget-object v7, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2971
invoke-virtual {v7}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
and-int v10, p2, v0
.line 2972
invoke-virtual {v7, v10}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v2, v1
.line 2974
:goto_0
if-eqz v2, :cond_4
.line 2975
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v3
.line 2976
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v0
if-ne v0, p2, :cond_3
if-eqz v3, :cond_3
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v0, p1, v3}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3
.line 2978
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v5
.line 2979
invoke-interface {v5}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v0
.line 2980
if-nez v0, :cond_1
.line 2981
invoke-interface {v5}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v0
if-eqz v0, :cond_0
.line 2983
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v0, v0, -0x1
.line 2984
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2985
sget-object v6, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object v0, p0
move v4, p2
invoke-virtual/range {v0 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->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;
move-result-object v0
.line 2987
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v1, v1, -0x1
.line 2988
invoke-virtual {v7, v10, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
.line 2989
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2991
:cond_0
const/4 v0, 0x0
.line 3011
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3012
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
:goto_1
return v0
.line 2994
:cond_1
:try_start_1
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v1, v1, Lcom/google/common/cache/LocalCache;->valueEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v1, p3, v0}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2
.line 2995
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2996
sget-object v0, Lcom/google/common/cache/RemovalCause;->REPLACED:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, p1, p2, v5, v0}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V
move-object v1, p0
move-object v3, p1
move-object v4, p4
move-wide v5, v8
.line 2997
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 2998
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 2999
const/4 v0, 0x1
.line 3011
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3012
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_1
.line 3003
:cond_2
:try_start_2
invoke-virtual {p0, v2, v8, v9}, Lcom/google/common/cache/LocalCache$Segment;->recordLockedRead(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 3004
const/4 v0, 0x0
.line 3011
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3012
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_1
.line 2974
:cond_3
:try_start_3
invoke-interface {v2}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
move-result-object v2
goto/16 :goto_0
.line 3009
:cond_4
const/4 v0, 0x0
.line 3011
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3012
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_1
.line 3011
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3012
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
throw v0
.end method
.method runLockedCleanup(J)V
.locals 3
.prologue
.line 3443
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryLock()Z
move-result v0
if-eqz v0, :cond_0
.line 3445
:try_start_0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainReferenceQueues()V
.line 3446
invoke-virtual {p0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->expireEntries(J)V
.line 3447
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->readCount:Ljava/util/concurrent/atomic/AtomicInteger;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->set(I)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3449
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3452
:cond_0
return-void
.line 3449
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
throw v0
.end method
.method runUnlockedCleanup()V
.locals 1
.prologue
.line 3456
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->isHeldByCurrentThread()Z
move-result v0
if-nez v0, :cond_0
.line 3457
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->processPendingNotifications()V
.line 3459
:cond_0
return-void
.end method
.method scheduleRefresh(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;JLcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;TK;ITV;J",
"Lcom/google/common/cache/CacheLoader",
"<-TK;TV;>;)TV;"
}
.end annotation
.prologue
.line 2363
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->refreshes()Z
move-result v0
if-eqz v0, :cond_0
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getWriteTime()J
move-result-wide v0
sub-long v0, p5, v0
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-wide v2, v2, Lcom/google/common/cache/LocalCache;->refreshNanos:J
cmp-long v0, v0, v2
if-lez v0, :cond_0
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result v0
if-nez v0, :cond_0
.line 2365
const/4 v0, 0x1
invoke-virtual {p0, p2, p3, p7, v0}, Lcom/google/common/cache/LocalCache$Segment;->refresh(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;Z)Ljava/lang/Object;
move-result-object v0
.line 2366
if-eqz v0, :cond_0
move-object p4, v0
.line 2370
:cond_0
return-object p4
.end method
.method setValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;TK;TV;J)V"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/GuardedBy;
value = "Segment.this"
.end annotation
.prologue
.line 2159
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v1
.line 2160
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->weigher:Lcom/google/common/cache/Weigher;
invoke-interface {v0, p2, p3}, Lcom/google/common/cache/Weigher;->weigh(Ljava/lang/Object;Ljava/lang/Object;)I
move-result v2
.line 2161
if-ltz v2, :cond_0
const/4 v0, 0x1
:goto_0
const-string v3, "Weights must be non-negative"
invoke-static {v0, v3}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/Object;)V
.line 2163
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->valueStrength:Lcom/google/common/cache/LocalCache$Strength;
invoke-virtual {v0, p0, p1, p3, v2}, 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
.line 2165
invoke-interface {p1, v0}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
.line 2166
invoke-virtual {p0, p1, v2, p4, p5}, Lcom/google/common/cache/LocalCache$Segment;->recordWrite(Lcom/google/common/cache/LocalCache$ReferenceEntry;IJ)V
.line 2167
invoke-interface {v1, p3}, Lcom/google/common/cache/LocalCache$ValueReference;->notifyNewValue(Ljava/lang/Object;)V
.line 2168
return-void
.line 2161
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method storeLoadedValue(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Ljava/lang/Object;)Z
.locals 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/LocalCache$LoadingValueReference",
"<TK;TV;>;TV;)Z"
}
.end annotation
.prologue
const/4 v6, 0x1
const/4 v2, 0x0
.line 3110
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
.line 3112
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v0, v0, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v0}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v4
.line 3113
invoke-virtual {p0, v4, v5}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
.line 3115
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v7, v0, 0x1
.line 3116
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->threshold:I
if-le v7, v0, :cond_0
.line 3117
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->expand()V
.line 3118
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v7, v0, 0x1
.line 3121
:cond_0
iget-object v8, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3122
invoke-virtual {v8}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
and-int v9, p2, v0
.line 3123
invoke-virtual {v8, v9}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-object v1, v0
.line 3125
:goto_0
if-eqz v1, :cond_6
.line 3126
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v3
.line 3127
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getHash()I
move-result v10
if-ne v10, p2, :cond_5
if-eqz v3, :cond_5
iget-object v10, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v10, v10, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {v10, p1, v3}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_5
.line 3129
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
.line 3130
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v3
.line 3133
if-eq p3, v0, :cond_1
if-nez v3, :cond_4
sget-object v8, Lcom/google/common/cache/LocalCache;->UNSET:Lcom/google/common/cache/LocalCache$ValueReference;
if-eq v0, v8, :cond_4
.line 3135
:cond_1
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3136
invoke-virtual {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->isActive()Z
move-result v0
if-eqz v0, :cond_2
.line 3137
if-nez v3, :cond_3
sget-object v0, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
.line 3139
:goto_1
invoke-virtual {p0, p1, p2, p3, v0}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V
.line 3140
add-int/lit8 v0, v7, -0x1
move v7, v0
:cond_2
move-object v0, p0
move-object v2, p1
move-object v3, p4
.line 3142
invoke-virtual/range {v0 .. v5}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 3143
iput v7, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 3144
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3163
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3164
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move v0, v6
:goto_2
return v0
.line 3137
:cond_3
:try_start_1
sget-object v0, Lcom/google/common/cache/RemovalCause;->REPLACED:Lcom/google/common/cache/RemovalCause;
goto :goto_1
.line 3149
:cond_4
new-instance v0, Lcom/google/common/cache/LocalCache$WeightedStrongValueReference;
const/4 v1, 0x0
invoke-direct {v0, p4, v1}, Lcom/google/common/cache/LocalCache$WeightedStrongValueReference;-><init>(Ljava/lang/Object;I)V
.line 3150
sget-object v1, Lcom/google/common/cache/RemovalCause;->REPLACED:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, p1, p2, v0, v1}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 3163
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3164
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move v0, v2
goto :goto_2
.line 3125
:cond_5
:try_start_2
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ReferenceEntry;->getNext()Lcom/google/common/cache/LocalCache$ReferenceEntry;
move-result-object v1
goto :goto_0
.line 3155
:cond_6
iget v1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v1, v1, 0x1
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3156
invoke-virtual {p0, p1, p2, v0}, 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 v1
move-object v0, p0
move-object v2, p1
move-object v3, p4
.line 3157
invoke-virtual/range {v0 .. v5}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 3158
invoke-virtual {v8, v9, v1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
.line 3159
iput v7, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 3160
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 3163
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3164
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
move v0, v6
goto :goto_2
.line 3163
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3164
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
throw v0
.end method
.method tryDrainReferenceQueues()V
.locals 1
.prologue
.line 2458
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryLock()Z
move-result v0
if-eqz v0, :cond_0
.line 2460
:try_start_0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainReferenceQueues()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2462
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2465
:cond_0
return-void
.line 2462
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
throw v0
.end method
.method tryExpireEntries(J)V
.locals 1
.prologue
.line 2606
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryLock()Z
move-result v0
if-eqz v0, :cond_0
.line 2608
:try_start_0
invoke-virtual {p0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->expireEntries(J)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2610
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2614
:cond_0
return-void
.line 2610
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
throw v0
.end method
.method waitForLoadingValue(Lcom/google/common/cache/LocalCache$ReferenceEntry;Ljava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;)Ljava/lang/Object;
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache$ReferenceEntry",
"<TK;TV;>;TK;",
"Lcom/google/common/cache/LocalCache$ValueReference",
"<TK;TV;>;)TV;"
}
.end annotation
.prologue
const/4 v2, 0x0
const/4 v1, 0x1
.line 2293
invoke-interface {p3}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result v0
if-nez v0, :cond_0
.line 2294
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
.line 2297
:cond_0
invoke-static {p1}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
move v0, v1
:goto_0
const-string v3, "Recursive load of: %s"
new-array v4, v1, [Ljava/lang/Object;
aput-object p2, v4, v2
invoke-static {v0, v3, v4}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/String;[Ljava/lang/Object;)V
.line 2300
:try_start_0
invoke-interface {p3}, Lcom/google/common/cache/LocalCache$ValueReference;->waitForValue()Ljava/lang/Object;
move-result-object v0
.line 2301
if-nez v0, :cond_2
.line 2302
new-instance v0, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "CacheLoader returned null for key "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, "."
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v0, v2}, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2309
:catchall_0
move-exception v0
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
invoke-interface {v2, v1}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V
throw v0
:cond_1
move v0, v2
.line 2297
goto :goto_0
.line 2305
:cond_2
:try_start_1
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v2, v2, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {v2}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v2
.line 2306
invoke-virtual {p0, p1, v2, v3}, Lcom/google/common/cache/LocalCache$Segment;->recordRead(Lcom/google/common/cache/LocalCache$ReferenceEntry;J)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 2309
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
invoke-interface {v2, v1}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V
return-object v0
.end method