2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lrx/subjects/PublishSubject$a;
|
|
|
|
.super Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
.source "PublishSubject.java"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lrx/Producer;
|
|
|
|
.implements Lrx/Subscription;
|
2020-09-10 21:23:57 +00:00
|
|
|
.implements Lt0/g;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lrx/subjects/PublishSubject;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x19
|
|
|
|
name = "a"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"<T:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
">",
|
|
|
|
"Ljava/util/concurrent/atomic/AtomicLong;",
|
|
|
|
"Lrx/Producer;",
|
|
|
|
"Lrx/Subscription;",
|
2020-09-10 21:23:57 +00:00
|
|
|
"Lt0/g<",
|
2020-05-17 12:40:10 +00:00
|
|
|
"TT;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final serialVersionUID:J = 0x59896c1df8e78b00L
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final actual:Lrx/Subscriber;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/Subscriber<",
|
|
|
|
"-TT;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final parent:Lrx/subjects/PublishSubject$b;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/PublishSubject$b<",
|
|
|
|
"TT;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public produced:J
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lrx/subjects/PublishSubject$b;Lrx/Subscriber;)V
|
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lrx/subjects/PublishSubject$b<",
|
|
|
|
"TT;>;",
|
|
|
|
"Lrx/Subscriber<",
|
|
|
|
"-TT;>;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lrx/subjects/PublishSubject$a;->parent:Lrx/subjects/PublishSubject$b;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lrx/subjects/PublishSubject$a;->actual:Lrx/Subscriber;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public isUnsubscribed()Z
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
const-wide/high16 v2, -0x8000000000000000L
|
|
|
|
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
.method public n(J)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 5
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p1, p2}, Lk0/j/a;->d0(J)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
const-wide/high16 v2, -0x8000000000000000L
|
|
|
|
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
|
|
|
|
if-nez v4, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {v0, v1, p1, p2}, Lk0/j/a;->d(JJ)J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0, v1, v2, v3}, Ljava/util/concurrent/atomic/AtomicLong;->compareAndSet(JJ)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onCompleted()V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
const-wide/high16 v2, -0x8000000000000000L
|
|
|
|
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lrx/subjects/PublishSubject$a;->actual:Lrx/Subscriber;
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
invoke-interface {v0}, Lt0/g;->onCompleted()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onError(Ljava/lang/Throwable;)V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
const-wide/high16 v2, -0x8000000000000000L
|
|
|
|
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lrx/subjects/PublishSubject$a;->actual:Lrx/Subscriber;
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
invoke-interface {v0, p1}, Lt0/g;->onError(Ljava/lang/Throwable;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onNext(Ljava/lang/Object;)V
|
|
|
|
.locals 5
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(TT;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
const-wide/high16 v2, -0x8000000000000000L
|
|
|
|
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
|
|
|
|
iget-wide v2, p0, Lrx/subjects/PublishSubject$a;->produced:J
|
|
|
|
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
|
|
|
|
const-wide/16 v0, 0x1
|
|
|
|
|
|
|
|
add-long/2addr v2, v0
|
|
|
|
|
|
|
|
iput-wide v2, p0, Lrx/subjects/PublishSubject$a;->produced:J
|
|
|
|
|
|
|
|
iget-object v0, p0, Lrx/subjects/PublishSubject$a;->actual:Lrx/Subscriber;
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
invoke-interface {v0, p1}, Lt0/g;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0}, Lrx/subjects/PublishSubject$a;->unsubscribe()V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lrx/subjects/PublishSubject$a;->actual:Lrx/Subscriber;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v0, Lrx/exceptions/MissingBackpressureException;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v1, "PublishSubject: could not emit value due to lack of requests"
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {v0, v1}, Lrx/exceptions/MissingBackpressureException;-><init>(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
invoke-interface {p1, v0}, Lt0/g;->onError(Ljava/lang/Throwable;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public unsubscribe()V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
const-wide/high16 v0, -0x8000000000000000L
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicLong;->getAndSet(J)J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
cmp-long v4, v2, v0
|
|
|
|
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Lrx/subjects/PublishSubject$a;->parent:Lrx/subjects/PublishSubject$b;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, p0}, Lrx/subjects/PublishSubject$b;->a(Lrx/subjects/PublishSubject$a;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|