Rabbit-R1/android (non root)/smali/smali_classes2/com/google/common/cache/LocalCache$Segment.smali
2024-05-21 17:08:36 -04:00

5571 lines
153 KiB
Smali

.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/ReferenceEntry<",
"TK;TV;>;>;"
}
.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
.annotation runtime Ljavax/annotation/CheckForNull;
.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/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/ReferenceEntry<",
"TK;TV;>;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
.field threshold:I
.field totalWeight:J
.field final valueReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/ReferenceQueue<",
"TV;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end field
.field final writeQueue:Ljava/util/Queue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Queue<",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;>;"
}
.end annotation
.end field
# direct methods
.method constructor <init>(Lcom/google/common/cache/LocalCache;IJLcom/google/common/cache/AbstractCache$StatsCounter;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/LocalCache<",
"TK;TV;>;IJ",
"Lcom/google/common/cache/AbstractCache$StatsCounter;",
")V"
}
.end annotation
.line 1943
invoke-direct {p0}, Ljava/util/concurrent/locks/ReentrantLock;-><init>()V
.line 1920
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;
iput-object p1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iput-wide p3, p0, Lcom/google/common/cache/LocalCache$Segment;->maxSegmentWeight:J
.line 1946
invoke-static {p5}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p3
check-cast p3, Lcom/google/common/cache/AbstractCache$StatsCounter;
iput-object p3, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.line 1947
invoke-virtual {p0, p2}, Lcom/google/common/cache/LocalCache$Segment;->newEntryArray(I)Ljava/util/concurrent/atomic/AtomicReferenceArray;
move-result-object p2
invoke-virtual {p0, p2}, Lcom/google/common/cache/LocalCache$Segment;->initTable(Ljava/util/concurrent/atomic/AtomicReferenceArray;)V
.line 1949
invoke-virtual {p1}, Lcom/google/common/cache/LocalCache;->usesKeyReferences()Z
move-result p2
const/4 p3, 0x0
if-eqz p2, :cond_0
new-instance p2, Ljava/lang/ref/ReferenceQueue;
invoke-direct {p2}, Ljava/lang/ref/ReferenceQueue;-><init>()V
goto :goto_0
:cond_0
move-object p2, p3
:goto_0
iput-object p2, p0, Lcom/google/common/cache/LocalCache$Segment;->keyReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.line 1951
invoke-virtual {p1}, Lcom/google/common/cache/LocalCache;->usesValueReferences()Z
move-result p2
if-eqz p2, :cond_1
new-instance p3, Ljava/lang/ref/ReferenceQueue;
invoke-direct {p3}, Ljava/lang/ref/ReferenceQueue;-><init>()V
:cond_1
iput-object p3, p0, Lcom/google/common/cache/LocalCache$Segment;->valueReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.line 1954
invoke-virtual {p1}, Lcom/google/common/cache/LocalCache;->usesAccessQueue()Z
move-result p2
if-eqz p2, :cond_2
.line 1955
new-instance p2, Ljava/util/concurrent/ConcurrentLinkedQueue;
invoke-direct {p2}, Ljava/util/concurrent/ConcurrentLinkedQueue;-><init>()V
goto :goto_1
.line 1956
:cond_2
invoke-static {}, Lcom/google/common/cache/LocalCache;->discardingQueue()Ljava/util/Queue;
move-result-object p2
:goto_1
iput-object p2, p0, Lcom/google/common/cache/LocalCache$Segment;->recencyQueue:Ljava/util/Queue;
.line 1959
invoke-virtual {p1}, Lcom/google/common/cache/LocalCache;->usesWriteQueue()Z
move-result p2
if-eqz p2, :cond_3
.line 1960
new-instance p2, Lcom/google/common/cache/LocalCache$WriteQueue;
invoke-direct {p2}, Lcom/google/common/cache/LocalCache$WriteQueue;-><init>()V
goto :goto_2
.line 1961
:cond_3
invoke-static {}, Lcom/google/common/cache/LocalCache;->discardingQueue()Ljava/util/Queue;
move-result-object p2
:goto_2
iput-object p2, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
.line 1964
invoke-virtual {p1}, Lcom/google/common/cache/LocalCache;->usesAccessQueue()Z
move-result p1
if-eqz p1, :cond_4
.line 1965
new-instance p1, Lcom/google/common/cache/LocalCache$AccessQueue;
invoke-direct {p1}, Lcom/google/common/cache/LocalCache$AccessQueue;-><init>()V
goto :goto_3
.line 1966
:cond_4
invoke-static {}, Lcom/google/common/cache/LocalCache;->discardingQueue()Ljava/util/Queue;
move-result-object p1
:goto_3
iput-object p1, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
return-void
.end method
# virtual methods
.method cleanUp()V
.locals 2
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 3365
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 3366
invoke-virtual {p0, v0, v1}, Lcom/google/common/cache/LocalCache$Segment;->runLockedCleanup(J)V
.line 3367
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->runUnlockedCleanup()V
return-void
.end method
.method clear()V
.locals 11
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
if-eqz v0, :cond_6
.line 3107
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 3109
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 3110
invoke-virtual {p0, v0, v1}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
const/4 v1, 0x0
move v2, v1
.line 3113
:goto_0
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v3
if-ge v2, v3, :cond_4
.line 3114
invoke-virtual {v0, v2}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/google/common/cache/ReferenceEntry;
:goto_1
if-eqz v3, :cond_3
.line 3116
invoke-interface {v3}, Lcom/google/common/cache/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_2
.line 3117
invoke-interface {v3}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v6
.line 3118
invoke-interface {v3}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v4
invoke-interface {v4}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v8
if-eqz v6, :cond_1
if-nez v8, :cond_0
goto :goto_2
.line 3120
:cond_0
sget-object v4, Lcom/google/common/cache/RemovalCause;->EXPLICIT:Lcom/google/common/cache/RemovalCause;
goto :goto_3
:cond_1
:goto_2
sget-object v4, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
:goto_3
move-object v10, v4
.line 3122
invoke-interface {v3}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v7
invoke-interface {v3}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v4
invoke-interface {v4}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v9
move-object v5, p0
.line 3121
invoke-virtual/range {v5 .. v10}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
.line 3114
:cond_2
invoke-interface {v3}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v3
goto :goto_1
:cond_3
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_4
move v2, v1
.line 3126
:goto_4
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v3
if-ge v2, v3, :cond_5
const/4 v3, 0x0
.line 3127
invoke-virtual {v0, v2, v3}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
add-int/lit8 v2, v2, 0x1
goto :goto_4
.line 3129
:cond_5
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->clearReferenceQueues()V
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
.line 3130
invoke-interface {v0}, Ljava/util/Queue;->clear()V
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
.line 3131
invoke-interface {v0}, Ljava/util/Queue;->clear()V
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->readCount:Ljava/util/concurrent/atomic/AtomicInteger;
.line 3132
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->set(I)V
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
iput v1, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3137
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3138
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
goto :goto_5
:catchall_0
move-exception v0
.line 3137
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3138
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 3139
throw v0
:cond_6
:goto_5
return-void
.end method
.method clearKeyReferenceQueue()V
.locals 1
:goto_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->keyReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.line 2414
invoke-virtual {v0}, Ljava/lang/ref/ReferenceQueue;->poll()Ljava/lang/ref/Reference;
move-result-object v0
if-eqz v0, :cond_0
goto :goto_0
:cond_0
return-void
.end method
.method clearReferenceQueues()V
.locals 1
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2405
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->usesKeyReferences()Z
move-result v0
if-eqz v0, :cond_0
.line 2406
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->clearKeyReferenceQueue()V
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2408
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->usesValueReferences()Z
move-result v0
if-eqz v0, :cond_1
.line 2409
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->clearValueReferenceQueue()V
:cond_1
return-void
.end method
.method clearValueReferenceQueue()V
.locals 1
:goto_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->valueReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.line 2418
invoke-virtual {v0}, Ljava/lang/ref/ReferenceQueue;->poll()Ljava/lang/ref/Reference;
move-result-object v0
if-eqz v0, :cond_0
goto :goto_0
:cond_0
return-void
.end method
.method containsKey(Ljava/lang/Object;I)Z
.locals 4
:try_start_0
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
const/4 v1, 0x0
if-eqz v0, :cond_2
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2647
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 2648
invoke-virtual {p0, p1, p2, v2, v3}, Lcom/google/common/cache/LocalCache$Segment;->getLiveEntry(Ljava/lang/Object;IJ)Lcom/google/common/cache/ReferenceEntry;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez p1, :cond_0
.line 2657
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
return v1
.line 2652
:cond_0
:try_start_1
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object p1
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-eqz p1, :cond_1
const/4 v1, 0x1
.line 2657
:cond_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
return v1
:cond_2
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
return v1
:catchall_0
move-exception p1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
.line 2658
throw p1
.end method
.method containsValue(Ljava/lang/Object;)Z
.locals 9
:try_start_0
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
const/4 v1, 0x0
if-eqz v0, :cond_3
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2669
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
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2671
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v4
move v5, v1
:goto_0
if-ge v5, v4, :cond_3
.line 2673
invoke-virtual {v0, v5}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/google/common/cache/ReferenceEntry;
:goto_1
if-eqz v6, :cond_2
.line 2674
invoke-virtual {p0, v6, v2, v3}, Lcom/google/common/cache/LocalCache$Segment;->getLiveValue(Lcom/google/common/cache/ReferenceEntry;J)Ljava/lang/Object;
move-result-object v7
if-nez v7, :cond_0
goto :goto_2
:cond_0
iget-object v8, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2678
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
move-result v7
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v7, :cond_1
.line 2687
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
const/4 p0, 0x1
return p0
.line 2673
:cond_1
:goto_2
:try_start_1
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v6
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_1
:cond_2
add-int/lit8 v5, v5, 0x1
goto :goto_0
.line 2687
:cond_3
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
return v1
:catchall_0
move-exception p1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
.line 2688
throw p1
.end method
.method copyEntry(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;)",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;"
}
.end annotation
.line 1993
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v0
const/4 v1, 0x0
if-nez v0, :cond_0
return-object v1
.line 1998
:cond_0
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
.line 1999
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v2
if-nez v2, :cond_1
.line 2000
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v3
if-eqz v3, :cond_1
return-object v1
:cond_1
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2005
iget-object v1, v1, Lcom/google/common/cache/LocalCache;->entryFactory:Lcom/google/common/cache/LocalCache$EntryFactory;
invoke-virtual {v1, p0, p1, p2}, Lcom/google/common/cache/LocalCache$EntryFactory;->copyEntry(Lcom/google/common/cache/LocalCache$Segment;Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
move-result-object p1
iget-object p0, p0, Lcom/google/common/cache/LocalCache$Segment;->valueReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.line 2006
invoke-interface {v0, p0, v2, p1}, Lcom/google/common/cache/LocalCache$ValueReference;->copyFor(Ljava/lang/ref/ReferenceQueue;Ljava/lang/Object;Lcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object p0
invoke-interface {p1, p0}, Lcom/google/common/cache/ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
return-object p1
.end method
.method drainKeyReferenceQueue()V
.locals 3
const/4 v0, 0x0
:cond_0
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->keyReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.line 2379
invoke-virtual {v1}, Ljava/lang/ref/ReferenceQueue;->poll()Ljava/lang/ref/Reference;
move-result-object v1
if-eqz v1, :cond_1
.line 2381
check-cast v1, Lcom/google/common/cache/ReferenceEntry;
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2382
invoke-virtual {v2, v1}, Lcom/google/common/cache/LocalCache;->reclaimKey(Lcom/google/common/cache/ReferenceEntry;)V
add-int/lit8 v0, v0, 0x1
const/16 v1, 0x10
if-ne v0, v1, :cond_0
:cond_1
return-void
.end method
.method drainRecencyQueue()V
.locals 2
:cond_0
:goto_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->recencyQueue:Ljava/util/Queue;
.line 2481
invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/ReferenceEntry;
if-eqz v0, :cond_1
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
.line 2486
invoke-interface {v1, v0}, Ljava/util/Queue;->contains(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_0
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
.line 2487
invoke-interface {v1, v0}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_1
return-void
.end method
.method drainReferenceQueues()V
.locals 1
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2367
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->usesKeyReferences()Z
move-result v0
if-eqz v0, :cond_0
.line 2368
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainKeyReferenceQueue()V
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2370
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->usesValueReferences()Z
move-result v0
if-eqz v0, :cond_1
.line 2371
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainValueReferenceQueue()V
:cond_1
return-void
.end method
.method drainValueReferenceQueue()V
.locals 3
const/4 v0, 0x0
:cond_0
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->valueReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.line 2393
invoke-virtual {v1}, Ljava/lang/ref/ReferenceQueue;->poll()Ljava/lang/ref/Reference;
move-result-object v1
if-eqz v1, :cond_1
.line 2395
check-cast v1, Lcom/google/common/cache/LocalCache$ValueReference;
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2396
invoke-virtual {v2, v1}, Lcom/google/common/cache/LocalCache;->reclaimValue(Lcom/google/common/cache/LocalCache$ValueReference;)V
add-int/lit8 v0, v0, 0x1
const/16 v1, 0x10
if-ne v0, v1, :cond_0
:cond_1
return-void
.end method
.method enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
.locals 4
.param p1 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.param p3 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;ITV;I",
"Lcom/google/common/cache/RemovalCause;",
")V"
}
.end annotation
iget-wide v0, p0, Lcom/google/common/cache/LocalCache$Segment;->totalWeight:J
int-to-long v2, p4
sub-long/2addr v0, v2
iput-wide v0, p0, Lcom/google/common/cache/LocalCache$Segment;->totalWeight:J
.line 2529
invoke-virtual {p5}, Lcom/google/common/cache/RemovalCause;->wasEvicted()Z
move-result p2
if-eqz p2, :cond_0
iget-object p2, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.line 2530
invoke-interface {p2}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordEviction()V
:cond_0
iget-object p2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2532
iget-object p2, p2, Lcom/google/common/cache/LocalCache;->removalNotificationQueue:Ljava/util/Queue;
sget-object p4, Lcom/google/common/cache/LocalCache;->DISCARDING_QUEUE:Ljava/util/Queue;
if-eq p2, p4, :cond_1
.line 2533
invoke-static {p1, p3, p5}, Lcom/google/common/cache/RemovalNotification;->create(Ljava/lang/Object;Ljava/lang/Object;Lcom/google/common/cache/RemovalCause;)Lcom/google/common/cache/RemovalNotification;
move-result-object p1
iget-object p0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2534
iget-object p0, p0, Lcom/google/common/cache/LocalCache;->removalNotificationQueue:Ljava/util/Queue;
invoke-interface {p0, p1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z
:cond_1
return-void
.end method
.method evictEntries(Lcom/google/common/cache/ReferenceEntry;)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;)V"
}
.end annotation
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2546
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->evictsBySize()Z
move-result v0
if-nez v0, :cond_0
return-void
.line 2550
:cond_0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainRecencyQueue()V
.line 2554
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v0
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_2
.line 2555
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v0
sget-object v1, Lcom/google/common/cache/RemovalCause;->SIZE:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, p1, v0, v1}, Lcom/google/common/cache/LocalCache$Segment;->removeEntry(Lcom/google/common/cache/ReferenceEntry;ILcom/google/common/cache/RemovalCause;)Z
move-result p1
if-eqz p1, :cond_1
goto :goto_0
.line 2556
:cond_1
new-instance p0, Ljava/lang/AssertionError;
invoke-direct {p0}, Ljava/lang/AssertionError;-><init>()V
throw p0
:cond_2
:goto_0
iget-wide v0, p0, Lcom/google/common/cache/LocalCache$Segment;->totalWeight:J
iget-wide v2, p0, Lcom/google/common/cache/LocalCache$Segment;->maxSegmentWeight:J
cmp-long p1, v0, v2
if-lez p1, :cond_4
.line 2561
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->getNextEvictable()Lcom/google/common/cache/ReferenceEntry;
move-result-object p1
.line 2562
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v0
sget-object v1, Lcom/google/common/cache/RemovalCause;->SIZE:Lcom/google/common/cache/RemovalCause;
invoke-virtual {p0, p1, v0, v1}, Lcom/google/common/cache/LocalCache$Segment;->removeEntry(Lcom/google/common/cache/ReferenceEntry;ILcom/google/common/cache/RemovalCause;)Z
move-result p1
if-eqz p1, :cond_3
goto :goto_0
.line 2563
:cond_3
new-instance p0, Ljava/lang/AssertionError;
invoke-direct {p0}, Ljava/lang/AssertionError;-><init>()V
throw p0
:cond_4
return-void
.end method
.method expand()V
.locals 11
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2770
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
const/high16 v2, 0x40000000 # 2.0f
if-lt v1, v2, :cond_0
return-void
:cond_0
iget v2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
shl-int/lit8 v3, v1, 0x1
.line 2786
invoke-virtual {p0, v3}, Lcom/google/common/cache/LocalCache$Segment;->newEntryArray(I)Ljava/util/concurrent/atomic/AtomicReferenceArray;
move-result-object v3
.line 2787
invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v4
mul-int/lit8 v4, v4, 0x3
div-int/lit8 v4, v4, 0x4
iput v4, p0, Lcom/google/common/cache/LocalCache$Segment;->threshold:I
.line 2788
invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v4
add-int/lit8 v4, v4, -0x1
const/4 v5, 0x0
:goto_0
if-ge v5, v1, :cond_6
.line 2792
invoke-virtual {v0, v5}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/google/common/cache/ReferenceEntry;
if-eqz v6, :cond_5
.line 2795
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v7
.line 2796
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v8
and-int/2addr v8, v4
if-nez v7, :cond_1
.line 2800
invoke-virtual {v3, v8, v6}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
goto :goto_4
:cond_1
move-object v9, v6
:goto_1
if-eqz v7, :cond_3
.line 2808
invoke-interface {v7}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v10
and-int/2addr v10, v4
if-eq v10, v8, :cond_2
move-object v9, v7
move v8, v10
.line 2807
:cond_2
invoke-interface {v7}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v7
goto :goto_1
.line 2815
:cond_3
invoke-virtual {v3, v8, v9}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
:goto_2
if-eq v6, v9, :cond_5
.line 2819
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v7
and-int/2addr v7, v4
.line 2820
invoke-virtual {v3, v7}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v8
check-cast v8, Lcom/google/common/cache/ReferenceEntry;
.line 2821
invoke-virtual {p0, v6, v8}, Lcom/google/common/cache/LocalCache$Segment;->copyEntry(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
move-result-object v8
if-eqz v8, :cond_4
.line 2823
invoke-virtual {v3, v7, v8}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
goto :goto_3
.line 2825
:cond_4
invoke-virtual {p0, v6}, Lcom/google/common/cache/LocalCache$Segment;->removeCollectedEntry(Lcom/google/common/cache/ReferenceEntry;)V
add-int/lit8 v2, v2, -0x1
.line 2818
:goto_3
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v6
goto :goto_2
:cond_5
:goto_4
add-int/lit8 v5, v5, 0x1
goto :goto_0
:cond_6
iput-object v3, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
iput v2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
return-void
.end method
.method expireEntries(J)V
.locals 3
.line 2508
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainRecencyQueue()V
:goto_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
.line 2511
invoke-interface {v0}, Ljava/util/Queue;->peek()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/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/ReferenceEntry;J)Z
move-result v1
if-eqz v1, :cond_1
.line 2512
invoke-interface {v0}, Lcom/google/common/cache/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/ReferenceEntry;ILcom/google/common/cache/RemovalCause;)Z
move-result v0
if-eqz v0, :cond_0
goto :goto_0
.line 2513
:cond_0
new-instance p0, Ljava/lang/AssertionError;
invoke-direct {p0}, Ljava/lang/AssertionError;-><init>()V
throw p0
:cond_1
:goto_1
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
.line 2516
invoke-interface {v0}, Ljava/util/Queue;->peek()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/ReferenceEntry;
if-eqz v0, :cond_3
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/ReferenceEntry;J)Z
move-result v1
if-eqz v1, :cond_3
.line 2517
invoke-interface {v0}, Lcom/google/common/cache/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/ReferenceEntry;ILcom/google/common/cache/RemovalCause;)Z
move-result v0
if-eqz v0, :cond_2
goto :goto_1
.line 2518
:cond_2
new-instance p0, Ljava/lang/AssertionError;
invoke-direct {p0}, Ljava/lang/AssertionError;-><init>()V
throw p0
:cond_3
return-void
.end method
.method get(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/CheckForNull;
.end annotation
:try_start_0
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
const/4 v1, 0x0
if-eqz v0, :cond_2
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2067
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 v7
.line 2068
invoke-virtual {p0, p1, p2, v7, v8}, Lcom/google/common/cache/LocalCache$Segment;->getLiveEntry(Ljava/lang/Object;IJ)Lcom/google/common/cache/ReferenceEntry;
move-result-object v3
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez v3, :cond_0
.line 2082
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
return-object v1
.line 2073
:cond_0
:try_start_1
invoke-interface {v3}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object p1
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v6
if-eqz v6, :cond_1
.line 2075
invoke-virtual {p0, v3, v7, v8}, Lcom/google/common/cache/LocalCache$Segment;->recordRead(Lcom/google/common/cache/ReferenceEntry;J)V
.line 2076
invoke-interface {v3}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v4
iget-object p1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v9, p1, Lcom/google/common/cache/LocalCache;->defaultLoader:Lcom/google/common/cache/CacheLoader;
move-object v2, p0
move v5, p2
invoke-virtual/range {v2 .. v9}, Lcom/google/common/cache/LocalCache$Segment;->scheduleRefresh(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;JLcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
move-result-object p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 2082
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
return-object p1
.line 2078
: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 2082
:cond_2
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
return-object v1
:catchall_0
move-exception p1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
.line 2083
throw p1
.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
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/util/concurrent/ExecutionException;
}
.end annotation
.line 2027
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 2028
invoke-static {p3}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
:try_start_0
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
if-eqz v0, :cond_1
.line 2032
invoke-virtual {p0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->getEntry(Ljava/lang/Object;I)Lcom/google/common/cache/ReferenceEntry;
move-result-object v2
if-eqz v2, :cond_1
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2034
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 2035
invoke-virtual {p0, v2, v6, v7}, Lcom/google/common/cache/LocalCache$Segment;->getLiveValue(Lcom/google/common/cache/ReferenceEntry;J)Ljava/lang/Object;
move-result-object v5
if-eqz v5, :cond_0
.line 2037
invoke-virtual {p0, v2, v6, v7}, Lcom/google/common/cache/LocalCache$Segment;->recordRead(Lcom/google/common/cache/ReferenceEntry;J)V
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
const/4 v1, 0x1
.line 2038
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 2039
invoke-virtual/range {v1 .. v8}, Lcom/google/common/cache/LocalCache$Segment;->scheduleRefresh(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;JLcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
move-result-object p1
: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
.line 2059
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
return-object p1
.line 2041
:cond_0
:try_start_1
invoke-interface {v2}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
.line 2042
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result v1
if-eqz v1, :cond_1
.line 2043
invoke-virtual {p0, v2, p1, v0}, Lcom/google/common/cache/LocalCache$Segment;->waitForLoadingValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;)Ljava/lang/Object;
move-result-object p1
: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
.line 2059
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
return-object p1
.line 2049
: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;
move-result-object p1
: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
.line 2059
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
return-object p1
:catchall_0
move-exception p1
goto :goto_0
:catch_0
move-exception p1
.line 2051
:try_start_3
invoke-virtual {p1}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object p2
.line 2052
instance-of p3, p2, Ljava/lang/Error;
if-nez p3, :cond_3
.line 2054
instance-of p3, p2, Ljava/lang/RuntimeException;
if-eqz p3, :cond_2
.line 2055
new-instance p1, Lcom/google/common/util/concurrent/UncheckedExecutionException;
invoke-direct {p1, p2}, Lcom/google/common/util/concurrent/UncheckedExecutionException;-><init>(Ljava/lang/Throwable;)V
throw p1
.line 2057
:cond_2
throw p1
.line 2053
:cond_3
new-instance p1, Lcom/google/common/util/concurrent/ExecutionError;
check-cast p2, Ljava/lang/Error;
invoke-direct {p1, p2}, Lcom/google/common/util/concurrent/ExecutionError;-><init>(Ljava/lang/Error;)V
throw p1
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
.line 2059
:goto_0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postReadCleanup()V
.line 2060
throw p1
.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
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/util/concurrent/ExecutionException;
}
.end annotation
.line 2235
:try_start_0
invoke-static {p4}, Lcom/google/common/util/concurrent/Uninterruptibles;->getUninterruptibly(Ljava/util/concurrent/Future;)Ljava/lang/Object;
move-result-object p4
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
if-eqz p4, :cond_1
:try_start_1
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.line 2239
invoke-virtual {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->elapsedNanos()J
move-result-wide v1
invoke-interface {v0, v1, v2}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordLoadSuccess(J)V
.line 2240
invoke-virtual {p0, p1, p2, p3, p4}, 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
if-nez p4, :cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.line 2244
invoke-virtual {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->elapsedNanos()J
move-result-wide v1
invoke-interface {v0, v1, v2}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordLoadException(J)V
.line 2245
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
return-object p4
:catchall_0
move-exception v0
goto :goto_0
.line 2237
:cond_1
:try_start_2
new-instance v0, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException;
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/String;->length()I
move-result v2
add-int/lit8 v2, v2, 0x23
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3, v2}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v2, "CacheLoader returned null for key "
invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, "."
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
:catchall_1
move-exception v0
const/4 p4, 0x0
:goto_0
if-nez p4, :cond_2
iget-object p4, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.line 2244
invoke-virtual {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->elapsedNanos()J
move-result-wide v1
invoke-interface {p4, v1, v2}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordLoadException(J)V
.line 2245
invoke-virtual {p0, p1, p2, p3}, Lcom/google/common/cache/LocalCache$Segment;->removeLoadingValue(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;)Z
.line 2247
:cond_2
throw v0
.end method
.method getEntry(Ljava/lang/Object;I)Lcom/google/common/cache/ReferenceEntry;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"I)",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 2591
invoke-virtual {p0, p2}, Lcom/google/common/cache/LocalCache$Segment;->getFirst(I)Lcom/google/common/cache/ReferenceEntry;
move-result-object v0
:goto_0
if-eqz v0, :cond_3
.line 2592
invoke-interface {v0}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v1
if-eq v1, p2, :cond_0
goto :goto_1
.line 2596
:cond_0
invoke-interface {v0}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v1
if-nez v1, :cond_1
.line 2598
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryDrainReferenceQueues()V
goto :goto_1
:cond_1
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2602
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_2
return-object v0
.line 2591
:cond_2
:goto_1
invoke-interface {v0}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v0
goto :goto_0
:cond_3
const/4 p0, 0x0
return-object p0
.end method
.method getFirst(I)Lcom/google/common/cache/ReferenceEntry;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;"
}
.end annotation
iget-object p0, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2584
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
and-int/2addr p1, v0
invoke-virtual {p0, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Lcom/google/common/cache/ReferenceEntry;
return-object p0
.end method
.method getLiveEntry(Ljava/lang/Object;IJ)Lcom/google/common/cache/ReferenceEntry;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"IJ)",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 2612
invoke-virtual {p0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->getEntry(Ljava/lang/Object;I)Lcom/google/common/cache/ReferenceEntry;
move-result-object p1
const/4 p2, 0x0
if-nez p1, :cond_0
return-object p2
:cond_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2615
invoke-virtual {v0, p1, p3, p4}, Lcom/google/common/cache/LocalCache;->isExpired(Lcom/google/common/cache/ReferenceEntry;J)Z
move-result v0
if-eqz v0, :cond_1
.line 2616
invoke-virtual {p0, p3, p4}, Lcom/google/common/cache/LocalCache$Segment;->tryExpireEntries(J)V
return-object p2
:cond_1
return-object p1
.end method
.method getLiveValue(Lcom/google/common/cache/ReferenceEntry;J)Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;J)TV;"
}
.end annotation
.line 2627
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v0
const/4 v1, 0x0
if-nez v0, :cond_0
.line 2628
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryDrainReferenceQueues()V
return-object v1
.line 2631
:cond_0
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v0
if-nez v0, :cond_1
.line 2633
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryDrainReferenceQueues()V
return-object v1
:cond_1
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2637
invoke-virtual {v2, p1, p2, p3}, Lcom/google/common/cache/LocalCache;->isExpired(Lcom/google/common/cache/ReferenceEntry;J)Z
move-result p1
if-eqz p1, :cond_2
.line 2638
invoke-virtual {p0, p2, p3}, Lcom/google/common/cache/LocalCache$Segment;->tryExpireEntries(J)V
return-object v1
:cond_2
return-object v0
.end method
.method getNextEvictable()Lcom/google/common/cache/ReferenceEntry;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;"
}
.end annotation
iget-object p0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
.line 2571
invoke-interface {p0}, Ljava/util/Queue;->iterator()Ljava/util/Iterator;
move-result-object p0
:cond_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_1
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/cache/ReferenceEntry;
.line 2572
invoke-interface {v0}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v1
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v1
if-lez v1, :cond_0
return-object v0
.line 2577
:cond_1
new-instance p0, Ljava/lang/AssertionError;
invoke-direct {p0}, Ljava/lang/AssertionError;-><init>()V
throw p0
.end method
.method initTable(Ljava/util/concurrent/atomic/AtomicReferenceArray;)V
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/concurrent/atomic/AtomicReferenceArray<",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;>;)V"
}
.end annotation
.line 1974
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
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 1975
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 v1, v0
iget-wide v3, p0, Lcom/google/common/cache/LocalCache$Segment;->maxSegmentWeight:J
cmp-long v1, v1, v3
if-nez v1, :cond_0
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->threshold:I
:cond_0
iput-object p1, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
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/CheckForNull;
.end annotation
.line 2301
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2303
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 2304
invoke-virtual {p0, v0, v1}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
iget-object v2, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2307
invoke-virtual {v2}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v3
add-int/lit8 v3, v3, -0x1
and-int/2addr v3, p2
.line 2308
invoke-virtual {v2, v3}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/google/common/cache/ReferenceEntry;
move-object v5, v4
:goto_0
if-eqz v5, :cond_3
.line 2312
invoke-interface {v5}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v6
.line 2313
invoke-interface {v5}, Lcom/google/common/cache/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;
.line 2315
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 2318
invoke-interface {v5}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object p1
.line 2319
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result p2
if-nez p2, :cond_1
if-eqz p3, :cond_0
.line 2320
invoke-interface {v5}, Lcom/google/common/cache/ReferenceEntry;->getWriteTime()J
move-result-wide p2
sub-long/2addr v0, p2
iget-object p2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-wide p2, p2, Lcom/google/common/cache/LocalCache;->refreshNanos:J
cmp-long p2, v0, p2
if-gez p2, :cond_0
goto :goto_1
:cond_0
iget p2, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 p2, p2, 0x1
iput p2, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2329
new-instance p2, Lcom/google/common/cache/LocalCache$LoadingValueReference;
invoke-direct {p2, p1}, Lcom/google/common/cache/LocalCache$LoadingValueReference;-><init>(Lcom/google/common/cache/LocalCache$ValueReference;)V
.line 2331
invoke-interface {v5, p2}, Lcom/google/common/cache/ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2343
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2344
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return-object p2
.line 2343
:cond_1
:goto_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2344
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
const/4 p0, 0x0
return-object p0
.line 2311
:cond_2
:try_start_1
invoke-interface {v5}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v5
goto :goto_0
:cond_3
iget p3, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 p3, p3, 0x1
iput p3, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2337
new-instance p3, Lcom/google/common/cache/LocalCache$LoadingValueReference;
invoke-direct {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;-><init>()V
.line 2338
invoke-virtual {p0, p1, p2, v4}, Lcom/google/common/cache/LocalCache$Segment;->newEntry(Ljava/lang/Object;ILcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
move-result-object p1
.line 2339
invoke-interface {p1, p3}, Lcom/google/common/cache/ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
.line 2340
invoke-virtual {v2, v3, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 2343
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2344
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return-object p3
:catchall_0
move-exception p1
.line 2343
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2344
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 2345
throw p1
.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 7
.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
.line 2209
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 p4
.line 2210
new-instance v6, Lcom/google/common/cache/LocalCache$Segment$1;
move-object v0, v6
move-object v1, p0
move-object v2, p1
move v3, p2
move-object v4, p3
move-object v5, p4
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
.line 2222
invoke-static {}, Lcom/google/common/util/concurrent/MoreExecutors;->directExecutor()Ljava/util/concurrent/Executor;
move-result-object p0
.line 2210
invoke-interface {p4, v6, p0}, Lcom/google/common/util/concurrent/ListenableFuture;->addListener(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V
return-object p4
.end method
.method loadSync(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Lcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
.locals 0
.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
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/util/concurrent/ExecutionException;
}
.end annotation
.line 2200
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 p4
.line 2201
invoke-virtual {p0, p1, p2, p3, p4}, 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 p0
return-object p0
.end method
.method lockedGetOrLoad(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
.locals 17
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/CacheLoader<",
"-TK;TV;>;)TV;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/util/concurrent/ExecutionException;
}
.end annotation
move-object/from16 v7, p0
move-object/from16 v0, p1
move/from16 v8, p2
.line 2092
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v1, v7, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2095
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 v1
.line 2096
invoke-virtual {v7, v1, v2}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
iget v3, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
const/4 v9, 0x1
add-int/lit8 v10, v3, -0x1
iget-object v11, v7, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2100
invoke-virtual {v11}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v3
sub-int/2addr v3, v9
and-int v12, v8, v3
.line 2101
invoke-virtual {v11, v12}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v3
move-object v13, v3
check-cast v13, Lcom/google/common/cache/ReferenceEntry;
move-object v14, v13
:goto_0
const/4 v15, 0x0
if-eqz v14, :cond_4
.line 2104
invoke-interface {v14}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v3
.line 2105
invoke-interface {v14}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v4
if-ne v4, v8, :cond_3
if-eqz v3, :cond_3
iget-object v4, v7, 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;
.line 2107
invoke-virtual {v4, v0, v3}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_3
.line 2108
invoke-interface {v14}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v16
.line 2109
invoke-interface/range {v16 .. v16}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result v4
if-eqz v4, :cond_0
const/4 v1, 0x0
:goto_1
move-object/from16 v2, v16
goto :goto_3
.line 2112
:cond_0
invoke-interface/range {v16 .. v16}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v4
if-nez v4, :cond_1
.line 2115
invoke-interface/range {v16 .. v16}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v5
sget-object v6, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object/from16 v1, p0
move-object v2, v3
move/from16 v3, p2
.line 2114
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
goto :goto_2
:cond_1
iget-object v5, v7, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2116
invoke-virtual {v5, v14, v1, v2}, Lcom/google/common/cache/LocalCache;->isExpired(Lcom/google/common/cache/ReferenceEntry;J)Z
move-result v5
if-eqz v5, :cond_2
.line 2120
invoke-interface/range {v16 .. v16}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v5
sget-object v6, Lcom/google/common/cache/RemovalCause;->EXPIRED:Lcom/google/common/cache/RemovalCause;
move-object/from16 v1, p0
move-object v2, v3
move/from16 v3, p2
.line 2119
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
:goto_2
iget-object v1, v7, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
.line 2129
invoke-interface {v1, v14}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
iget-object v1, v7, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
.line 2130
invoke-interface {v1, v14}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
iput v10, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
move v1, v9
goto :goto_1
.line 2122
:cond_2
invoke-virtual {v7, v14, v1, v2}, Lcom/google/common/cache/LocalCache$Segment;->recordLockedRead(Lcom/google/common/cache/ReferenceEntry;J)V
iget-object v0, v7, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.line 2123
invoke-interface {v0, v9}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordHits(I)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_2
.line 2149
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2150
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return-object v4
.line 2103
:cond_3
:try_start_1
invoke-interface {v14}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v14
goto :goto_0
:cond_4
move v1, v9
move-object v2, v15
:goto_3
if-eqz v1, :cond_6
.line 2138
new-instance v15, Lcom/google/common/cache/LocalCache$LoadingValueReference;
invoke-direct {v15}, Lcom/google/common/cache/LocalCache$LoadingValueReference;-><init>()V
if-nez v14, :cond_5
.line 2141
invoke-virtual {v7, v0, v8, v13}, Lcom/google/common/cache/LocalCache$Segment;->newEntry(Ljava/lang/Object;ILcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
move-result-object v14
.line 2142
invoke-interface {v14, v15}, Lcom/google/common/cache/ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
.line 2143
invoke-virtual {v11, v12, v14}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
goto :goto_4
.line 2145
:cond_5
invoke-interface {v14, v15}, Lcom/google/common/cache/ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_2
.line 2149
:cond_6
:goto_4
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2150
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
if-eqz v1, :cond_7
.line 2158
:try_start_2
monitor-enter v14
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
move-object/from16 v1, p3
.line 2159
:try_start_3
invoke-virtual {v7, v0, v8, v15, v1}, 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 v0
monitor-exit v14
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
iget-object v1, v7, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.line 2162
invoke-interface {v1, v9}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V
return-object v0
:catchall_0
move-exception v0
.line 2160
:try_start_4
monitor-exit v14
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
:try_start_5
throw v0
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_1
:catchall_1
move-exception v0
iget-object v1, v7, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.line 2162
invoke-interface {v1, v9}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V
.line 2163
throw v0
.line 2166
:cond_7
invoke-virtual {v7, v14, v0, v2}, Lcom/google/common/cache/LocalCache$Segment;->waitForLoadingValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;)Ljava/lang/Object;
move-result-object v0
return-object v0
:catchall_2
move-exception v0
.line 2149
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2150
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 2151
throw v0
.end method
.method newEntry(Ljava/lang/Object;ILcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
.locals 1
.param p3 # Lcom/google/common/cache/ReferenceEntry;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;)",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;"
}
.end annotation
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 1984
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 p1
invoke-virtual {v0, p0, p1, p2, p3}, Lcom/google/common/cache/LocalCache$EntryFactory;->newEntry(Lcom/google/common/cache/LocalCache$Segment;Ljava/lang/Object;ILcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
move-result-object p0
return-object p0
.end method
.method newEntryArray(I)Ljava/util/concurrent/atomic/AtomicReferenceArray;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Ljava/util/concurrent/atomic/AtomicReferenceArray<",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;>;"
}
.end annotation
.line 1970
new-instance p0, Ljava/util/concurrent/atomic/AtomicReferenceArray;
invoke-direct {p0, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;-><init>(I)V
return-object p0
.end method
.method postReadCleanup()V
.locals 1
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->readCount:Ljava/util/concurrent/atomic/AtomicInteger;
.line 3343
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 3344
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->cleanUp()V
:cond_0
return-void
.end method
.method postWriteCleanup()V
.locals 0
.line 3361
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->runUnlockedCleanup()V
return-void
.end method
.method preWriteCleanup(J)V
.locals 0
.line 3356
invoke-virtual {p0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->runLockedCleanup(J)V
return-void
.end method
.method put(Ljava/lang/Object;ILjava/lang/Object;Z)Ljava/lang/Object;
.locals 14
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;ITV;Z)TV;"
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
move-object v7, p0
move-object v0, p1
move/from16 v3, p2
.line 2693
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v1, v7, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2695
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 v8
.line 2696
invoke-virtual {p0, v8, v9}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
iget v1, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v1, v1, 0x1
iget v2, v7, Lcom/google/common/cache/LocalCache$Segment;->threshold:I
if-le v1, v2, :cond_0
.line 2700
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->expand()V
:cond_0
iget-object v10, v7, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2705
invoke-virtual {v10}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
add-int/lit8 v1, v1, -0x1
and-int v11, v3, v1
.line 2706
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/ReferenceEntry;
move-object v12, v1
:goto_0
const/4 v13, 0x0
if-eqz v12, :cond_5
.line 2710
invoke-interface {v12}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v2
.line 2711
invoke-interface {v12}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v4
if-ne v4, v3, :cond_4
if-eqz v2, :cond_4
iget-object v4, v7, 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;
.line 2713
invoke-virtual {v4, p1, v2}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_4
.line 2716
invoke-interface {v12}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v1
.line 2717
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v10
if-nez v10, :cond_2
iget v2, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v2, v2, 0x1
iput v2, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2721
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v2
if-eqz v2, :cond_1
.line 2723
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v5
sget-object v6, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object v1, p0
move-object v2, p1
move/from16 v3, p2
move-object v4, v10
.line 2722
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
move-object v1, p0
move-object v2, v12
move-object v3, p1
move-object/from16 v4, p3
move-wide v5, v8
.line 2724
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
iget v0, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
goto :goto_1
:cond_1
move-object v1, p0
move-object v2, v12
move-object v3, p1
move-object/from16 v4, p3
move-wide v5, v8
.line 2727
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
iget v0, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v0, v0, 0x1
:goto_1
iput v0, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 2731
invoke-virtual {p0, v12}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries(Lcom/google/common/cache/ReferenceEntry;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2761
:goto_2
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2762
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return-object v13
:cond_2
if-eqz p4, :cond_3
.line 2737
:try_start_1
invoke-virtual {p0, v12, v8, v9}, Lcom/google/common/cache/LocalCache$Segment;->recordLockedRead(Lcom/google/common/cache/ReferenceEntry;J)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 2761
:goto_3
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2762
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return-object v10
:cond_3
:try_start_2
iget v2, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v2, v2, 0x1
iput v2, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2743
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v5
sget-object v6, Lcom/google/common/cache/RemovalCause;->REPLACED:Lcom/google/common/cache/RemovalCause;
move-object v1, p0
move-object v2, p1
move/from16 v3, p2
move-object v4, v10
.line 2742
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
move-object v1, p0
move-object v2, v12
move-object v3, p1
move-object/from16 v4, p3
move-wide v5, v8
.line 2744
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 2745
invoke-virtual {p0, v12}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries(Lcom/google/common/cache/ReferenceEntry;)V
goto :goto_3
.line 2709
:cond_4
invoke-interface {v12}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v12
goto/16 :goto_0
:cond_5
iget v2, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v2, v2, 0x1
iput v2, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2753
invoke-virtual {p0, p1, v3, v1}, Lcom/google/common/cache/LocalCache$Segment;->newEntry(Ljava/lang/Object;ILcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
move-result-object v12
move-object v1, p0
move-object v2, v12
move-object v3, p1
move-object/from16 v4, p3
move-wide v5, v8
.line 2754
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 2755
invoke-virtual {v10, v11, v12}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
iget v0, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v0, v0, 0x1
iput v0, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 2758
invoke-virtual {p0, v12}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries(Lcom/google/common/cache/ReferenceEntry;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
goto :goto_2
:catchall_0
move-exception v0
.line 2761
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2762
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 2763
throw v0
.end method
.method reclaimKey(Lcom/google/common/cache/ReferenceEntry;I)Z
.locals 12
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;I)Z"
}
.end annotation
.line 3198
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3202
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
const/4 v2, 0x1
sub-int/2addr v1, v2
and-int/2addr v1, p2
.line 3203
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v3
move-object v5, v3
check-cast v5, Lcom/google/common/cache/ReferenceEntry;
move-object v6, v5
:goto_0
if-eqz v6, :cond_1
if-ne v6, p1, :cond_0
iget p1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/2addr p1, v2
iput p1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3212
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v7
.line 3214
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object p1
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v9
.line 3215
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v10
sget-object v11, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object v4, p0
move v8, p2
.line 3209
invoke-virtual/range {v4 .. v11}, Lcom/google/common/cache/LocalCache$Segment;->removeValueFromChain(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)Lcom/google/common/cache/ReferenceEntry;
move-result-object p1
iget p2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
sub-int/2addr p2, v2
.line 3218
invoke-virtual {v0, v1, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
iput p2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3226
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3227
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return v2
.line 3205
:cond_0
:try_start_1
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v6
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
.line 3226
:cond_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3227
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
const/4 p0, 0x0
return p0
:catchall_0
move-exception p1
.line 3226
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3227
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 3228
throw p1
.end method
.method reclaimValue(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$ValueReference;)Z
.locals 12
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/LocalCache$ValueReference<",
"TK;TV;>;)Z"
}
.end annotation
.line 3233
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3237
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
const/4 v2, 0x1
sub-int/2addr v1, v2
and-int/2addr v1, p2
.line 3238
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v3
move-object v5, v3
check-cast v5, Lcom/google/common/cache/ReferenceEntry;
move-object v6, v5
:goto_0
const/4 v3, 0x0
if-eqz v6, :cond_4
.line 3241
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v7
.line 3242
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v4
if-ne v4, p2, :cond_3
if-eqz v7, :cond_3
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;
.line 3244
invoke-virtual {v4, p1, v7}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_3
.line 3245
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object p1
if-ne p1, p3, :cond_1
iget p1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/2addr p1, v2
iput p1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3254
invoke-interface {p3}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v9
sget-object v11, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object v4, p0
move v8, p2
move-object v10, p3
.line 3249
invoke-virtual/range {v4 .. v11}, Lcom/google/common/cache/LocalCache$Segment;->removeValueFromChain(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)Lcom/google/common/cache/ReferenceEntry;
move-result-object p1
iget p2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
sub-int/2addr p2, v2
.line 3258
invoke-virtual {v0, v1, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
iput p2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3268
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3269
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->isHeldByCurrentThread()Z
move-result p1
if-nez p1, :cond_0
.line 3270
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
:cond_0
return v2
.line 3268
:cond_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3269
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->isHeldByCurrentThread()Z
move-result p1
if-nez p1, :cond_2
.line 3270
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
:cond_2
return v3
.line 3240
:cond_3
:try_start_1
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v6
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
.line 3268
:cond_4
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3269
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->isHeldByCurrentThread()Z
move-result p1
if-nez p1, :cond_5
.line 3270
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
:cond_5
return v3
:catchall_0
move-exception p1
.line 3268
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3269
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->isHeldByCurrentThread()Z
move-result p2
if-nez p2, :cond_6
.line 3270
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 3272
:cond_6
throw p1
.end method
.method recordLockedRead(Lcom/google/common/cache/ReferenceEntry;J)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;J)V"
}
.end annotation
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2446
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->recordsAccess()Z
move-result v0
if-eqz v0, :cond_0
.line 2447
invoke-interface {p1, p2, p3}, Lcom/google/common/cache/ReferenceEntry;->setAccessTime(J)V
:cond_0
iget-object p0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
.line 2449
invoke-interface {p0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
return-void
.end method
.method recordRead(Lcom/google/common/cache/ReferenceEntry;J)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;J)V"
}
.end annotation
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2431
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->recordsAccess()Z
move-result v0
if-eqz v0, :cond_0
.line 2432
invoke-interface {p1, p2, p3}, Lcom/google/common/cache/ReferenceEntry;->setAccessTime(J)V
:cond_0
iget-object p0, p0, Lcom/google/common/cache/LocalCache$Segment;->recencyQueue:Ljava/util/Queue;
.line 2434
invoke-interface {p0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
return-void
.end method
.method recordWrite(Lcom/google/common/cache/ReferenceEntry;IJ)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;IJ)V"
}
.end annotation
.line 2459
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainRecencyQueue()V
iget-wide v0, p0, Lcom/google/common/cache/LocalCache$Segment;->totalWeight:J
int-to-long v2, p2
add-long/2addr v0, v2
iput-wide v0, p0, Lcom/google/common/cache/LocalCache$Segment;->totalWeight:J
iget-object p2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2462
invoke-virtual {p2}, Lcom/google/common/cache/LocalCache;->recordsAccess()Z
move-result p2
if-eqz p2, :cond_0
.line 2463
invoke-interface {p1, p3, p4}, Lcom/google/common/cache/ReferenceEntry;->setAccessTime(J)V
:cond_0
iget-object p2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2465
invoke-virtual {p2}, Lcom/google/common/cache/LocalCache;->recordsWrite()Z
move-result p2
if-eqz p2, :cond_1
.line 2466
invoke-interface {p1, p3, p4}, Lcom/google/common/cache/ReferenceEntry;->setWriteTime(J)V
:cond_1
iget-object p2, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
.line 2468
invoke-interface {p2, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
iget-object p0, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
.line 2469
invoke-interface {p0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
return-void
.end method
.method refresh(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;Z)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/CacheLoader<",
"-TK;TV;>;Z)TV;"
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 2277
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 p4
const/4 v0, 0x0
if-nez p4, :cond_0
return-object v0
.line 2282
:cond_0
invoke-virtual {p0, p1, p2, p4, 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 p0
.line 2283
invoke-interface {p0}, Lcom/google/common/util/concurrent/ListenableFuture;->isDone()Z
move-result p1
if-eqz p1, :cond_1
.line 2285
:try_start_0
invoke-static {p0}, Lcom/google/common/util/concurrent/Uninterruptibles;->getUninterruptibly(Ljava/util/concurrent/Future;)Ljava/lang/Object;
move-result-object p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
return-object p0
:catchall_0
:cond_1
return-object v0
.end method
.method remove(Ljava/lang/Object;I)Ljava/lang/Object;
.locals 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"I)TV;"
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 2954
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2956
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 2957
invoke-virtual {p0, v0, v1}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2961
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
add-int/lit8 v1, v1, -0x1
and-int/2addr v1, p2
.line 2962
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v2
move-object v4, v2
check-cast v4, Lcom/google/common/cache/ReferenceEntry;
move-object v5, v4
:goto_0
const/4 v2, 0x0
if-eqz v5, :cond_1
.line 2965
invoke-interface {v5}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v6
.line 2966
invoke-interface {v5}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v3
if-ne v3, p2, :cond_2
if-eqz v6, :cond_2
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;
.line 2968
invoke-virtual {v3, p1, v6}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_2
.line 2969
invoke-interface {v5}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v9
.line 2970
invoke-interface {v9}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object p1
if-eqz p1, :cond_0
.line 2974
sget-object v2, Lcom/google/common/cache/RemovalCause;->EXPLICIT:Lcom/google/common/cache/RemovalCause;
:goto_1
move-object v10, v2
goto :goto_2
.line 2975
:cond_0
invoke-interface {v9}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v3
if-eqz v3, :cond_1
.line 2976
sget-object v2, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
goto :goto_1
:goto_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
move-object v3, p0
move v7, p2
move-object v8, p1
.line 2984
invoke-virtual/range {v3 .. v10}, Lcom/google/common/cache/LocalCache$Segment;->removeValueFromChain(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)Lcom/google/common/cache/ReferenceEntry;
move-result-object p2
iget v2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v2, v2, -0x1
.line 2986
invoke-virtual {v0, v1, p2}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
iput v2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2994
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2995
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return-object p1
.line 2994
:cond_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2995
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return-object v2
.line 2964
:cond_2
:try_start_1
invoke-interface {v5}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v5
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:catchall_0
move-exception p1
.line 2994
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2995
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 2996
throw p1
.end method
.method remove(Ljava/lang/Object;ILjava/lang/Object;)Z
.locals 12
.line 3000
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 3002
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 3003
invoke-virtual {p0, v0, v1}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3007
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
const/4 v2, 0x1
sub-int/2addr v1, v2
and-int/2addr v1, p2
.line 3008
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v3
move-object v5, v3
check-cast v5, Lcom/google/common/cache/ReferenceEntry;
move-object v6, v5
:goto_0
const/4 v3, 0x0
if-eqz v6, :cond_2
.line 3011
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v7
.line 3012
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v4
if-ne v4, p2, :cond_3
if-eqz v7, :cond_3
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;
.line 3014
invoke-virtual {v4, p1, v7}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_3
.line 3015
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v10
.line 3016
invoke-interface {v10}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v9
iget-object p1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 3019
iget-object p1, p1, Lcom/google/common/cache/LocalCache;->valueEquivalence:Lcom/google/common/base/Equivalence;
invoke-virtual {p1, p3, v9}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_0
.line 3020
sget-object p1, Lcom/google/common/cache/RemovalCause;->EXPLICIT:Lcom/google/common/cache/RemovalCause;
goto :goto_1
:cond_0
if-nez v9, :cond_2
.line 3021
invoke-interface {v10}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result p1
if-eqz p1, :cond_2
.line 3022
sget-object p1, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
:goto_1
iget p3, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/2addr p3, v2
iput p3, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
move-object v4, p0
move v8, p2
move-object v11, p1
.line 3030
invoke-virtual/range {v4 .. v11}, Lcom/google/common/cache/LocalCache$Segment;->removeValueFromChain(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)Lcom/google/common/cache/ReferenceEntry;
move-result-object p2
iget p3, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
sub-int/2addr p3, v2
.line 3032
invoke-virtual {v0, v1, p2}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
iput p3, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 3034
sget-object p2, 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 p1, p2, :cond_1
goto :goto_2
:cond_1
move v2, v3
.line 3040
:goto_2
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3041
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return v2
.line 3040
:cond_2
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3041
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return v3
.line 3010
:cond_3
:try_start_1
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v6
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:catchall_0
move-exception p1
.line 3040
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3041
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 3042
throw p1
.end method
.method removeCollectedEntry(Lcom/google/common/cache/ReferenceEntry;)V
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;)V"
}
.end annotation
.line 3187
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v1
.line 3188
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v2
.line 3189
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v3
.line 3190
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v4
sget-object v5, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object v0, p0
.line 3186
invoke-virtual/range {v0 .. v5}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
.line 3192
invoke-interface {v0, p1}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
iget-object p0, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
.line 3193
invoke-interface {p0, p1}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
return-void
.end method
.method removeEntry(Lcom/google/common/cache/ReferenceEntry;ILcom/google/common/cache/RemovalCause;)Z
.locals 12
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;I",
"Lcom/google/common/cache/RemovalCause;",
")Z"
}
.end annotation
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3313
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
const/4 v2, 0x1
sub-int/2addr v1, v2
and-int/2addr v1, p2
.line 3314
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v3
move-object v5, v3
check-cast v5, Lcom/google/common/cache/ReferenceEntry;
move-object v6, v5
:goto_0
if-eqz v6, :cond_1
if-ne v6, p1, :cond_0
iget p1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/2addr p1, v2
iput p1, p0, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3323
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v7
.line 3325
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object p1
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v9
.line 3326
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v10
move-object v4, p0
move v8, p2
move-object v11, p3
.line 3320
invoke-virtual/range {v4 .. v11}, Lcom/google/common/cache/LocalCache$Segment;->removeValueFromChain(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)Lcom/google/common/cache/ReferenceEntry;
move-result-object p1
iget p2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
sub-int/2addr p2, v2
.line 3329
invoke-virtual {v0, v1, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
iput p2, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
return v2
.line 3316
:cond_0
invoke-interface {v6}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v6
goto :goto_0
:cond_1
const/4 p0, 0x0
return p0
.end method
.method removeEntryFromChain(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;)",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
iget v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 3170
invoke-interface {p2}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v1
:goto_0
if-eq p1, p2, :cond_1
.line 3172
invoke-virtual {p0, p1, v1}, Lcom/google/common/cache/LocalCache$Segment;->copyEntry(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
move-result-object v2
if-eqz v2, :cond_0
move-object v1, v2
goto :goto_1
.line 3176
:cond_0
invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache$Segment;->removeCollectedEntry(Lcom/google/common/cache/ReferenceEntry;)V
add-int/lit8 v0, v0, -0x1
.line 3171
:goto_1
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object p1
goto :goto_0
:cond_1
iput v0, p0, Lcom/google/common/cache/LocalCache$Segment;->count:I
return-object v1
.end method
.method removeLoadingValue(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;)Z
.locals 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/LocalCache$LoadingValueReference<",
"TK;TV;>;)Z"
}
.end annotation
.line 3276
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3279
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
const/4 v2, 0x1
sub-int/2addr v1, v2
and-int/2addr v1, p2
.line 3280
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/google/common/cache/ReferenceEntry;
move-object v4, v3
:goto_0
const/4 v5, 0x0
if-eqz v4, :cond_1
.line 3283
invoke-interface {v4}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v6
.line 3284
invoke-interface {v4}, Lcom/google/common/cache/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;
.line 3286
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 3287
invoke-interface {v4}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object p1
if-ne p1, p3, :cond_1
.line 3289
invoke-virtual {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->isActive()Z
move-result p1
if-eqz p1, :cond_0
.line 3290
invoke-virtual {p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->getOldValue()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object p1
invoke-interface {v4, p1}, Lcom/google/common/cache/ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
goto :goto_1
.line 3292
:cond_0
invoke-virtual {p0, v3, v4}, Lcom/google/common/cache/LocalCache$Segment;->removeEntryFromChain(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
move-result-object p1
.line 3293
invoke-virtual {v0, v1, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3303
:goto_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3304
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return v2
.line 3303
:cond_1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3304
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return v5
.line 3282
:cond_2
:try_start_1
invoke-interface {v4}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v4
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:catchall_0
move-exception p1
.line 3303
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3304
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 3305
throw p1
.end method
.method removeValueFromChain(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)Lcom/google/common/cache/ReferenceEntry;
.locals 6
.param p3 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;TK;ITV;",
"Lcom/google/common/cache/LocalCache$ValueReference<",
"TK;TV;>;",
"Lcom/google/common/cache/RemovalCause;",
")",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.line 3153
invoke-interface {p6}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v4
move-object v0, p0
move-object v1, p3
move v2, p4
move-object v3, p5
move-object v5, p7
invoke-virtual/range {v0 .. v5}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
iget-object p3, p0, Lcom/google/common/cache/LocalCache$Segment;->writeQueue:Ljava/util/Queue;
.line 3154
invoke-interface {p3, p2}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
iget-object p3, p0, Lcom/google/common/cache/LocalCache$Segment;->accessQueue:Ljava/util/Queue;
.line 3155
invoke-interface {p3, p2}, Ljava/util/Queue;->remove(Ljava/lang/Object;)Z
.line 3157
invoke-interface {p6}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result p3
if-eqz p3, :cond_0
const/4 p0, 0x0
.line 3158
invoke-interface {p6, p0}, Lcom/google/common/cache/LocalCache$ValueReference;->notifyNewValue(Ljava/lang/Object;)V
return-object p1
.line 3161
:cond_0
invoke-virtual {p0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->removeEntryFromChain(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
move-result-object p0
return-object p0
.end method
.method replace(Ljava/lang/Object;ILjava/lang/Object;)Ljava/lang/Object;
.locals 17
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;ITV;)TV;"
}
.end annotation
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
move-object/from16 v9, p0
move/from16 v0, p2
.line 2899
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v1, v9, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2901
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 v7
.line 2902
invoke-virtual {v9, v7, v8}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
iget-object v10, v9, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2905
invoke-virtual {v10}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
add-int/lit8 v1, v1, -0x1
and-int v11, v0, v1
.line 2906
invoke-virtual {v10, v11}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v1
move-object v2, v1
check-cast v2, Lcom/google/common/cache/ReferenceEntry;
move-object v12, v2
:goto_0
const/4 v13, 0x0
if-eqz v12, :cond_0
.line 2909
invoke-interface {v12}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v4
.line 2910
invoke-interface {v12}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v1
if-ne v1, v0, :cond_2
if-eqz v4, :cond_2
iget-object v1, v9, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v1, v1, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
move-object/from16 v14, p1
.line 2912
invoke-virtual {v1, v14, v4}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_3
.line 2913
invoke-interface {v12}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v15
.line 2914
invoke-interface {v15}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v16
if-nez v16, :cond_1
.line 2916
invoke-interface {v15}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v1
if-eqz v1, :cond_0
iget v1, v9, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v1, v1, 0x1
iput v1, v9, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2920
sget-object v8, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object/from16 v1, p0
move-object v3, v12
move/from16 v5, p2
move-object/from16 v6, v16
move-object v7, v15
.line 2921
invoke-virtual/range {v1 .. v8}, Lcom/google/common/cache/LocalCache$Segment;->removeValueFromChain(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)Lcom/google/common/cache/ReferenceEntry;
move-result-object v0
iget v1, v9, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/lit8 v1, v1, -0x1
.line 2930
invoke-virtual {v10, v11, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
iput v1, v9, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2947
:cond_0
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2948
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return-object v13
:cond_1
:try_start_1
iget v1, v9, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/lit8 v1, v1, 0x1
iput v1, v9, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2938
invoke-interface {v15}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v5
sget-object v6, Lcom/google/common/cache/RemovalCause;->REPLACED:Lcom/google/common/cache/RemovalCause;
move-object/from16 v1, p0
move-object/from16 v2, p1
move/from16 v3, p2
move-object/from16 v4, v16
.line 2937
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
move-object/from16 v1, p0
move-object v2, v12
move-object/from16 v3, p1
move-object/from16 v4, p3
move-wide v5, v7
.line 2939
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 2940
invoke-virtual {v9, v12}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries(Lcom/google/common/cache/ReferenceEntry;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 2947
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2948
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return-object v16
:cond_2
move-object/from16 v14, p1
.line 2908
:cond_3
:try_start_2
invoke-interface {v12}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v12
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
goto/16 :goto_0
:catchall_0
move-exception v0
.line 2947
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2948
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 2949
throw v0
.end method
.method replace(Ljava/lang/Object;ILjava/lang/Object;Ljava/lang/Object;)Z
.locals 17
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;ITV;TV;)Z"
}
.end annotation
move-object/from16 v9, p0
move/from16 v0, p2
.line 2837
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v1, v9, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2839
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 v7
.line 2840
invoke-virtual {v9, v7, v8}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
iget-object v10, v9, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 2843
invoke-virtual {v10}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
const/4 v11, 0x1
sub-int/2addr v1, v11
and-int v12, v0, v1
.line 2844
invoke-virtual {v10, v12}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v1
move-object v2, v1
check-cast v2, Lcom/google/common/cache/ReferenceEntry;
move-object v13, v2
:goto_0
const/4 v14, 0x0
if-eqz v13, :cond_0
.line 2847
invoke-interface {v13}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v4
.line 2848
invoke-interface {v13}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v1
if-ne v1, v0, :cond_3
if-eqz v4, :cond_3
iget-object v1, v9, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-object v1, v1, Lcom/google/common/cache/LocalCache;->keyEquivalence:Lcom/google/common/base/Equivalence;
move-object/from16 v15, p1
.line 2850
invoke-virtual {v1, v15, v4}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_4
.line 2851
invoke-interface {v13}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v16
.line 2852
invoke-interface/range {v16 .. v16}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v6
if-nez v6, :cond_1
.line 2854
invoke-interface/range {v16 .. v16}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
move-result v1
if-eqz v1, :cond_0
iget v1, v9, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/2addr v1, v11
iput v1, v9, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2858
sget-object v8, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
move-object/from16 v1, p0
move-object v3, v13
move/from16 v5, p2
move-object/from16 v7, v16
.line 2859
invoke-virtual/range {v1 .. v8}, Lcom/google/common/cache/LocalCache$Segment;->removeValueFromChain(Lcom/google/common/cache/ReferenceEntry;Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;Lcom/google/common/cache/RemovalCause;)Lcom/google/common/cache/ReferenceEntry;
move-result-object v0
iget v1, v9, Lcom/google/common/cache/LocalCache$Segment;->count:I
sub-int/2addr v1, v11
.line 2868
invoke-virtual {v10, v12, v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
iput v1, v9, Lcom/google/common/cache/LocalCache$Segment;->count:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2892
:cond_0
:goto_1
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2893
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return v14
:cond_1
:try_start_1
iget-object v1, v9, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2874
iget-object v1, v1, Lcom/google/common/cache/LocalCache;->valueEquivalence:Lcom/google/common/base/Equivalence;
move-object/from16 v3, p3
invoke-virtual {v1, v3, v6}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_2
iget v1, v9, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/2addr v1, v11
iput v1, v9, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 2877
invoke-interface/range {v16 .. v16}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
move-result v5
sget-object v10, Lcom/google/common/cache/RemovalCause;->REPLACED:Lcom/google/common/cache/RemovalCause;
move-object/from16 v1, p0
move-object/from16 v2, p1
move/from16 v3, p2
move-object v4, v6
move-object v6, v10
.line 2876
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
move-object/from16 v1, p0
move-object v2, v13
move-object/from16 v3, p1
move-object/from16 v4, p4
move-wide v5, v7
.line 2878
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 2879
invoke-virtual {v9, v13}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries(Lcom/google/common/cache/ReferenceEntry;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 2892
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2893
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return v11
.line 2884
:cond_2
:try_start_2
invoke-virtual {v9, v13, v7, v8}, Lcom/google/common/cache/LocalCache$Segment;->recordLockedRead(Lcom/google/common/cache/ReferenceEntry;J)V
goto :goto_1
:cond_3
move-object/from16 v15, p1
:cond_4
move-object/from16 v3, p3
.line 2846
invoke-interface {v13}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v13
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
goto/16 :goto_0
:catchall_0
move-exception v0
.line 2892
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2893
invoke-virtual/range {p0 .. p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 2894
throw v0
.end method
.method runLockedCleanup(J)V
.locals 1
.line 3371
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryLock()Z
move-result v0
if-eqz v0, :cond_0
.line 3373
:try_start_0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->drainReferenceQueues()V
.line 3374
invoke-virtual {p0, p1, p2}, Lcom/google/common/cache/LocalCache$Segment;->expireEntries(J)V
iget-object p1, p0, Lcom/google/common/cache/LocalCache$Segment;->readCount:Ljava/util/concurrent/atomic/AtomicInteger;
const/4 p2, 0x0
.line 3375
invoke-virtual {p1, p2}, Ljava/util/concurrent/atomic/AtomicInteger;->set(I)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3377
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
goto :goto_0
:catchall_0
move-exception p1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3378
throw p1
:cond_0
:goto_0
return-void
.end method
.method runUnlockedCleanup()V
.locals 1
.line 3384
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->isHeldByCurrentThread()Z
move-result v0
if-nez v0, :cond_0
iget-object p0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 3385
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache;->processPendingNotifications()V
:cond_0
return-void
.end method
.method scheduleRefresh(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;ILjava/lang/Object;JLcom/google/common/cache/CacheLoader;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;TK;ITV;J",
"Lcom/google/common/cache/CacheLoader<",
"-TK;TV;>;)TV;"
}
.end annotation
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2257
invoke-virtual {v0}, Lcom/google/common/cache/LocalCache;->refreshes()Z
move-result v0
if-eqz v0, :cond_0
.line 2258
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getWriteTime()J
move-result-wide v0
sub-long/2addr p5, v0
iget-object v0, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
iget-wide v0, v0, Lcom/google/common/cache/LocalCache;->refreshNanos:J
cmp-long p5, p5, v0
if-lez p5, :cond_0
.line 2259
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object p1
invoke-interface {p1}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result p1
if-nez p1, :cond_0
const/4 p1, 0x1
.line 2260
invoke-virtual {p0, p2, p3, p7, p1}, Lcom/google/common/cache/LocalCache$Segment;->refresh(Ljava/lang/Object;ILcom/google/common/cache/CacheLoader;Z)Ljava/lang/Object;
move-result-object p0
if-eqz p0, :cond_0
return-object p0
:cond_0
return-object p4
.end method
.method setValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;TK;TV;J)V"
}
.end annotation
.line 2013
invoke-interface {p1}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v0
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2014
iget-object v1, v1, Lcom/google/common/cache/LocalCache;->weigher:Lcom/google/common/cache/Weigher;
invoke-interface {v1, p2, p3}, Lcom/google/common/cache/Weigher;->weigh(Ljava/lang/Object;Ljava/lang/Object;)I
move-result p2
if-ltz p2, :cond_0
const/4 v1, 0x1
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
const-string v2, "Weights must be non-negative"
.line 2015
invoke-static {v1, v2}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/Object;)V
iget-object v1, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2017
iget-object v1, v1, Lcom/google/common/cache/LocalCache;->valueStrength:Lcom/google/common/cache/LocalCache$Strength;
.line 2018
invoke-virtual {v1, p0, p1, p3, p2}, Lcom/google/common/cache/LocalCache$Strength;->referenceValue(Lcom/google/common/cache/LocalCache$Segment;Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;I)Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v1
.line 2019
invoke-interface {p1, v1}, Lcom/google/common/cache/ReferenceEntry;->setValueReference(Lcom/google/common/cache/LocalCache$ValueReference;)V
.line 2020
invoke-virtual {p0, p1, p2, p4, p5}, Lcom/google/common/cache/LocalCache$Segment;->recordWrite(Lcom/google/common/cache/ReferenceEntry;IJ)V
.line 2021
invoke-interface {v0, p3}, Lcom/google/common/cache/LocalCache$ValueReference;->notifyNewValue(Ljava/lang/Object;)V
return-void
.end method
.method storeLoadedValue(Ljava/lang/Object;ILcom/google/common/cache/LocalCache$LoadingValueReference;Ljava/lang/Object;)Z
.locals 15
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;I",
"Lcom/google/common/cache/LocalCache$LoadingValueReference<",
"TK;TV;>;TV;)Z"
}
.end annotation
move-object v7, p0
move-object/from16 v0, p1
move/from16 v3, p2
.line 3047
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->lock()V
:try_start_0
iget-object v1, v7, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 3049
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 v8
.line 3050
invoke-virtual {p0, v8, v9}, Lcom/google/common/cache/LocalCache$Segment;->preWriteCleanup(J)V
iget v1, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
const/4 v10, 0x1
add-int/2addr v1, v10
iget v2, v7, Lcom/google/common/cache/LocalCache$Segment;->threshold:I
if-le v1, v2, :cond_0
.line 3054
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->expand()V
iget v1, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
add-int/2addr v1, v10
:cond_0
move v11, v1
iget-object v12, v7, Lcom/google/common/cache/LocalCache$Segment;->table:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3059
invoke-virtual {v12}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v1
sub-int/2addr v1, v10
and-int v13, v3, v1
.line 3060
invoke-virtual {v12, v13}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/common/cache/ReferenceEntry;
move-object v14, v1
:goto_0
if-eqz v14, :cond_6
.line 3063
invoke-interface {v14}, Lcom/google/common/cache/ReferenceEntry;->getKey()Ljava/lang/Object;
move-result-object v2
.line 3064
invoke-interface {v14}, Lcom/google/common/cache/ReferenceEntry;->getHash()I
move-result v4
if-ne v4, v3, :cond_5
if-eqz v2, :cond_5
iget-object v4, v7, 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;
.line 3066
invoke-virtual {v4, v0, v2}, Lcom/google/common/base/Equivalence;->equivalent(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_5
.line 3067
invoke-interface {v14}, Lcom/google/common/cache/ReferenceEntry;->getValueReference()Lcom/google/common/cache/LocalCache$ValueReference;
move-result-object v1
.line 3068
invoke-interface {v1}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
move-result-object v4
move-object/from16 v2, p3
if-eq v2, v1, :cond_2
if-nez v4, :cond_1
.line 3071
sget-object v5, Lcom/google/common/cache/LocalCache;->UNSET:Lcom/google/common/cache/LocalCache$ValueReference;
if-eq v1, v5, :cond_1
goto :goto_1
:cond_1
const/4 v5, 0x0
.line 3087
sget-object v6, Lcom/google/common/cache/RemovalCause;->REPLACED:Lcom/google/common/cache/RemovalCause;
move-object v1, p0
move-object/from16 v2, p1
move/from16 v3, p2
move-object/from16 v4, p4
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3100
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3101
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
const/4 v0, 0x0
return v0
:cond_2
:goto_1
:try_start_1
iget v1, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/2addr v1, v10
iput v1, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3074
invoke-virtual/range {p3 .. p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->isActive()Z
move-result v1
if-eqz v1, :cond_4
if-nez v4, :cond_3
.line 3076
sget-object v1, Lcom/google/common/cache/RemovalCause;->COLLECTED:Lcom/google/common/cache/RemovalCause;
goto :goto_2
:cond_3
sget-object v1, Lcom/google/common/cache/RemovalCause;->REPLACED:Lcom/google/common/cache/RemovalCause;
:goto_2
move-object v6, v1
.line 3077
invoke-virtual/range {p3 .. p3}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->getWeight()I
move-result v5
move-object v1, p0
move-object/from16 v2, p1
move/from16 v3, p2
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->enqueueNotification(Ljava/lang/Object;ILjava/lang/Object;ILcom/google/common/cache/RemovalCause;)V
add-int/lit8 v11, v11, -0x1
:cond_4
move-object v1, p0
move-object v2, v14
move-object/from16 v3, p1
move-object/from16 v4, p4
move-wide v5, v8
.line 3080
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
iput v11, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 3082
invoke-virtual {p0, v14}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries(Lcom/google/common/cache/ReferenceEntry;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 3100
:goto_3
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3101
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
return v10
:cond_5
move-object/from16 v2, p3
.line 3062
:try_start_2
invoke-interface {v14}, Lcom/google/common/cache/ReferenceEntry;->getNext()Lcom/google/common/cache/ReferenceEntry;
move-result-object v14
goto :goto_0
:cond_6
iget v2, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
add-int/2addr v2, v10
iput v2, v7, Lcom/google/common/cache/LocalCache$Segment;->modCount:I
.line 3093
invoke-virtual {p0, v0, v3, v1}, Lcom/google/common/cache/LocalCache$Segment;->newEntry(Ljava/lang/Object;ILcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/ReferenceEntry;
move-result-object v14
move-object v1, p0
move-object v2, v14
move-object/from16 v3, p1
move-object/from16 v4, p4
move-wide v5, v8
.line 3094
invoke-virtual/range {v1 .. v6}, Lcom/google/common/cache/LocalCache$Segment;->setValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Ljava/lang/Object;J)V
.line 3095
invoke-virtual {v12, v13, v14}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
iput v11, v7, Lcom/google/common/cache/LocalCache$Segment;->count:I
.line 3097
invoke-virtual {p0, v14}, Lcom/google/common/cache/LocalCache$Segment;->evictEntries(Lcom/google/common/cache/ReferenceEntry;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
goto :goto_3
:catchall_0
move-exception v0
.line 3100
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 3101
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->postWriteCleanup()V
.line 3102
throw v0
.end method
.method tryDrainReferenceQueues()V
.locals 1
.line 2352
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryLock()Z
move-result v0
if-eqz v0, :cond_0
.line 2354
: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 2356
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
goto :goto_0
:catchall_0
move-exception v0
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2357
throw v0
:cond_0
:goto_0
return-void
.end method
.method tryExpireEntries(J)V
.locals 1
.line 2496
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->tryLock()Z
move-result v0
if-eqz v0, :cond_0
.line 2498
: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 2500
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
goto :goto_0
:catchall_0
move-exception p1
invoke-virtual {p0}, Lcom/google/common/cache/LocalCache$Segment;->unlock()V
.line 2502
throw p1
:cond_0
:goto_0
return-void
.end method
.method waitForLoadingValue(Lcom/google/common/cache/ReferenceEntry;Ljava/lang/Object;Lcom/google/common/cache/LocalCache$ValueReference;)Ljava/lang/Object;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/cache/ReferenceEntry<",
"TK;TV;>;TK;",
"Lcom/google/common/cache/LocalCache$ValueReference<",
"TK;TV;>;)TV;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/util/concurrent/ExecutionException;
}
.end annotation
.line 2172
invoke-interface {p3}, Lcom/google/common/cache/LocalCache$ValueReference;->isLoading()Z
move-result v0
if-eqz v0, :cond_1
.line 2176
invoke-static {p1}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
move-result v0
const/4 v1, 0x1
xor-int/2addr v0, v1
const-string v2, "Recursive load of: %s"
invoke-static {v0, v2, p2}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/String;Ljava/lang/Object;)V
.line 2179
:try_start_0
invoke-interface {p3}, Lcom/google/common/cache/LocalCache$ValueReference;->waitForValue()Ljava/lang/Object;
move-result-object p3
if-eqz p3, :cond_0
iget-object p2, p0, Lcom/google/common/cache/LocalCache$Segment;->map:Lcom/google/common/cache/LocalCache;
.line 2184
iget-object p2, p2, Lcom/google/common/cache/LocalCache;->ticker:Lcom/google/common/base/Ticker;
invoke-virtual {p2}, Lcom/google/common/base/Ticker;->read()J
move-result-wide v2
.line 2185
invoke-virtual {p0, p1, v2, v3}, Lcom/google/common/cache/LocalCache$Segment;->recordRead(Lcom/google/common/cache/ReferenceEntry;J)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget-object p0, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.line 2188
invoke-interface {p0, v1}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V
return-object p3
.line 2181
:cond_0
:try_start_1
new-instance p1, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException;
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p3
invoke-virtual {p3}, Ljava/lang/String;->length()I
move-result p3
add-int/lit8 p3, p3, 0x23
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0, p3}, Ljava/lang/StringBuilder;-><init>(I)V
const-string p3, "CacheLoader returned null for key "
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p3
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p2
const-string p3, "."
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p2
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Lcom/google/common/cache/CacheLoader$InvalidCacheLoadException;-><init>(Ljava/lang/String;)V
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception p1
iget-object p0, p0, Lcom/google/common/cache/LocalCache$Segment;->statsCounter:Lcom/google/common/cache/AbstractCache$StatsCounter;
.line 2188
invoke-interface {p0, v1}, Lcom/google/common/cache/AbstractCache$StatsCounter;->recordMisses(I)V
.line 2189
throw p1
.line 2173
:cond_1
new-instance p0, Ljava/lang/AssertionError;
invoke-direct {p0}, Ljava/lang/AssertionError;-><init>()V
throw p0
.end method