mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
453 lines
13 KiB
Smali
453 lines
13 KiB
Smali
.class Lcom/google/common/cache/LocalCache$LoadingValueReference;
|
|
.super Ljava/lang/Object;
|
|
.source "LocalCache.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/google/common/cache/LocalCache$ValueReference;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/google/common/cache/LocalCache;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x8
|
|
name = "LoadingValueReference"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<K:",
|
|
"Ljava/lang/Object;",
|
|
"V:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lcom/google/common/cache/LocalCache$ValueReference<",
|
|
"TK;TV;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final futureValue:Lcom/google/common/util/concurrent/SettableFuture;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/google/common/util/concurrent/SettableFuture<",
|
|
"TV;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field volatile oldValue:Lcom/google/common/cache/LocalCache$ValueReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/google/common/cache/LocalCache$ValueReference<",
|
|
"TK;TV;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final stopwatch:Lcom/google/common/base/Stopwatch;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 3398
|
|
invoke-static {}, Lcom/google/common/cache/LocalCache;->unset()Lcom/google/common/cache/LocalCache$ValueReference;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0}, Lcom/google/common/cache/LocalCache$LoadingValueReference;-><init>(Lcom/google/common/cache/LocalCache$ValueReference;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/google/common/cache/LocalCache$ValueReference;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/google/common/cache/LocalCache$ValueReference<",
|
|
"TK;TV;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 3401
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 3394
|
|
invoke-static {}, Lcom/google/common/util/concurrent/SettableFuture;->create()Lcom/google/common/util/concurrent/SettableFuture;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->futureValue:Lcom/google/common/util/concurrent/SettableFuture;
|
|
|
|
.line 3395
|
|
invoke-static {}, Lcom/google/common/base/Stopwatch;->createUnstarted()Lcom/google/common/base/Stopwatch;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->stopwatch:Lcom/google/common/base/Stopwatch;
|
|
|
|
iput-object p1, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->oldValue:Lcom/google/common/cache/LocalCache$ValueReference;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private fullyFailedFuture(Ljava/lang/Throwable;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Throwable;",
|
|
")",
|
|
"Lcom/google/common/util/concurrent/ListenableFuture<",
|
|
"TV;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 3429
|
|
invoke-static {p1}, Lcom/google/common/util/concurrent/Futures;->immediateFailedFuture(Ljava/lang/Throwable;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public copyFor(Ljava/lang/ref/ReferenceQueue;Ljava/lang/Object;Lcom/google/common/cache/ReferenceEntry;)Lcom/google/common/cache/LocalCache$ValueReference;
|
|
.locals 0
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/ref/ReferenceQueue<",
|
|
"TV;>;TV;",
|
|
"Lcom/google/common/cache/ReferenceEntry<",
|
|
"TK;TV;>;)",
|
|
"Lcom/google/common/cache/LocalCache$ValueReference<",
|
|
"TK;TV;>;"
|
|
}
|
|
.end annotation
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public elapsedNanos()J
|
|
.locals 2
|
|
|
|
iget-object p0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->stopwatch:Lcom/google/common/base/Stopwatch;
|
|
|
|
.line 3480
|
|
sget-object v0, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {p0, v0}, Lcom/google/common/base/Stopwatch;->elapsed(Ljava/util/concurrent/TimeUnit;)J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public get()Ljava/lang/Object;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TV;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->oldValue:Lcom/google/common/cache/LocalCache$ValueReference;
|
|
|
|
.line 3490
|
|
invoke-interface {p0}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public getEntry()Lcom/google/common/cache/ReferenceEntry;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lcom/google/common/cache/ReferenceEntry<",
|
|
"TK;TV;>;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public getOldValue()Lcom/google/common/cache/LocalCache$ValueReference;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lcom/google/common/cache/LocalCache$ValueReference<",
|
|
"TK;TV;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->oldValue:Lcom/google/common/cache/LocalCache$ValueReference;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public getWeight()I
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->oldValue:Lcom/google/common/cache/LocalCache$ValueReference;
|
|
|
|
.line 3417
|
|
invoke-interface {p0}, Lcom/google/common/cache/LocalCache$ValueReference;->getWeight()I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public isActive()Z
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->oldValue:Lcom/google/common/cache/LocalCache$ValueReference;
|
|
|
|
.line 3412
|
|
invoke-interface {p0}, Lcom/google/common/cache/LocalCache$ValueReference;->isActive()Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public isLoading()Z
|
|
.locals 0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public loadFuture(Ljava/lang/Object;Lcom/google/common/cache/CacheLoader;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TK;",
|
|
"Lcom/google/common/cache/CacheLoader<",
|
|
"-TK;TV;>;)",
|
|
"Lcom/google/common/util/concurrent/ListenableFuture<",
|
|
"TV;>;"
|
|
}
|
|
.end annotation
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->stopwatch:Lcom/google/common/base/Stopwatch;
|
|
|
|
.line 3448
|
|
invoke-virtual {v0}, Lcom/google/common/base/Stopwatch;->start()Lcom/google/common/base/Stopwatch;
|
|
|
|
iget-object v0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->oldValue:Lcom/google/common/cache/LocalCache$ValueReference;
|
|
|
|
.line 3449
|
|
invoke-interface {v0}, Lcom/google/common/cache/LocalCache$ValueReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 3451
|
|
invoke-virtual {p2, p1}, Lcom/google/common/cache/CacheLoader;->load(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
.line 3452
|
|
invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->set(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
iget-object p0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->futureValue:Lcom/google/common/util/concurrent/SettableFuture;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {p1}, Lcom/google/common/util/concurrent/Futures;->immediateFuture(Ljava/lang/Object;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_0
|
|
return-object p0
|
|
|
|
.line 3454
|
|
:cond_1
|
|
invoke-virtual {p2, p1, v0}, Lcom/google/common/cache/CacheLoader;->reload(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 3456
|
|
invoke-static {p1}, Lcom/google/common/util/concurrent/Futures;->immediateFuture(Ljava/lang/Object;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 3460
|
|
:cond_2
|
|
new-instance p2, Lcom/google/common/cache/LocalCache$LoadingValueReference$1;
|
|
|
|
invoke-direct {p2, p0}, Lcom/google/common/cache/LocalCache$LoadingValueReference$1;-><init>(Lcom/google/common/cache/LocalCache$LoadingValueReference;)V
|
|
|
|
.line 3469
|
|
invoke-static {}, Lcom/google/common/util/concurrent/MoreExecutors;->directExecutor()Ljava/util/concurrent/Executor;
|
|
|
|
move-result-object v0
|
|
|
|
.line 3460
|
|
invoke-static {p1, p2, v0}, Lcom/google/common/util/concurrent/Futures;->transform(Lcom/google/common/util/concurrent/ListenableFuture;Lcom/google/common/base/Function;Ljava/util/concurrent/Executor;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
return-object p0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 3471
|
|
invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->setException(Ljava/lang/Throwable;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
iget-object p0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->futureValue:Lcom/google/common/util/concurrent/SettableFuture;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
invoke-direct {p0, p1}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->fullyFailedFuture(Ljava/lang/Throwable;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
|
|
move-result-object p0
|
|
|
|
.line 3472
|
|
:goto_1
|
|
instance-of p1, p1, Ljava/lang/InterruptedException;
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
.line 3473
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Thread;->interrupt()V
|
|
|
|
:cond_4
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public notifyNewValue(Ljava/lang/Object;)V
|
|
.locals 0
|
|
.param p1 # Ljava/lang/Object;
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TV;)V"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 3437
|
|
invoke-virtual {p0, p1}, Lcom/google/common/cache/LocalCache$LoadingValueReference;->set(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
.line 3440
|
|
:cond_0
|
|
invoke-static {}, Lcom/google/common/cache/LocalCache;->unset()Lcom/google/common/cache/LocalCache$ValueReference;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->oldValue:Lcom/google/common/cache/LocalCache$ValueReference;
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public set(Ljava/lang/Object;)Z
|
|
.locals 0
|
|
.param p1 # Ljava/lang/Object;
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TV;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->futureValue:Lcom/google/common/util/concurrent/SettableFuture;
|
|
|
|
.line 3421
|
|
invoke-virtual {p0, p1}, Lcom/google/common/util/concurrent/SettableFuture;->set(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public setException(Ljava/lang/Throwable;)Z
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->futureValue:Lcom/google/common/util/concurrent/SettableFuture;
|
|
|
|
.line 3425
|
|
invoke-virtual {p0, p1}, Lcom/google/common/util/concurrent/SettableFuture;->setException(Ljava/lang/Throwable;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public waitForValue()Ljava/lang/Object;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TV;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/util/concurrent/ExecutionException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lcom/google/common/cache/LocalCache$LoadingValueReference;->futureValue:Lcom/google/common/util/concurrent/SettableFuture;
|
|
|
|
.line 3485
|
|
invoke-static {p0}, Lcom/google/common/util/concurrent/Uninterruptibles;->getUninterruptibly(Ljava/util/concurrent/Future;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|