338 lines
11 KiB
Smali
338 lines
11 KiB
Smali
.class final Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;
|
|
.super Lrx/Subscriber;
|
|
.source "CompletableOnSubscribeConcat.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lrx/internal/operators/CompletableOnSubscribeConcat;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x18
|
|
name = "CompletableConcatSubscriber"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber$ConcatInnerSubscriber;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/Subscriber",
|
|
"<",
|
|
"Lrx/Completable;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final actual:Lrx/Completable$CompletableSubscriber;
|
|
|
|
.field volatile done:Z
|
|
|
|
.field final inner:Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber$ConcatInnerSubscriber;
|
|
|
|
.field final once:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.field final prefetch:I
|
|
|
|
.field final queue:Lrx/internal/util/unsafe/SpscArrayQueue;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/internal/util/unsafe/SpscArrayQueue",
|
|
"<",
|
|
"Lrx/Completable;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final sr:Lrx/subscriptions/SerialSubscription;
|
|
|
|
.field final wip:Ljava/util/concurrent/atomic/AtomicInteger;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lrx/Completable$CompletableSubscriber;I)V
|
|
.locals 2
|
|
.param p1, "actual" # Lrx/Completable$CompletableSubscriber;
|
|
.param p2, "prefetch" # I
|
|
|
|
.prologue
|
|
invoke-direct {p0}, Lrx/Subscriber;-><init>()V
|
|
|
|
iput-object p1, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->actual:Lrx/Completable$CompletableSubscriber;
|
|
|
|
iput p2, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->prefetch:I
|
|
|
|
new-instance v0, Lrx/internal/util/unsafe/SpscArrayQueue;
|
|
|
|
invoke-direct {v0, p2}, Lrx/internal/util/unsafe/SpscArrayQueue;-><init>(I)V
|
|
|
|
iput-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->queue:Lrx/internal/util/unsafe/SpscArrayQueue;
|
|
|
|
new-instance v0, Lrx/subscriptions/SerialSubscription;
|
|
|
|
invoke-direct {v0}, Lrx/subscriptions/SerialSubscription;-><init>()V
|
|
|
|
iput-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->sr:Lrx/subscriptions/SerialSubscription;
|
|
|
|
new-instance v0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber$ConcatInnerSubscriber;
|
|
|
|
invoke-direct {v0, p0}, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber$ConcatInnerSubscriber;-><init>(Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;)V
|
|
|
|
iput-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->inner:Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber$ConcatInnerSubscriber;
|
|
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>()V
|
|
|
|
iput-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->wip:Ljava/util/concurrent/atomic/AtomicInteger;
|
|
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>()V
|
|
|
|
iput-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->once:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
iget-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->sr:Lrx/subscriptions/SerialSubscription;
|
|
|
|
invoke-virtual {p0, v0}, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->add(Lrx/Subscription;)V
|
|
|
|
int-to-long v0, p2
|
|
|
|
invoke-virtual {p0, v0, v1}, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->request(J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method innerComplete()V
|
|
.locals 2
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->wip:Ljava/util/concurrent/atomic/AtomicInteger;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->decrementAndGet()I
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->next()V
|
|
|
|
:cond_0
|
|
iget-boolean v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->done:Z
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-wide/16 v0, 0x1
|
|
|
|
invoke-virtual {p0, v0, v1}, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->request(J)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method innerError(Ljava/lang/Throwable;)V
|
|
.locals 0
|
|
.param p1, "e" # Ljava/lang/Throwable;
|
|
|
|
.prologue
|
|
invoke-virtual {p0}, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->unsubscribe()V
|
|
|
|
invoke-virtual {p0, p1}, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->onError(Ljava/lang/Throwable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method next()V
|
|
.locals 5
|
|
|
|
.prologue
|
|
iget-boolean v1, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->done:Z
|
|
|
|
.local v1, "d":Z
|
|
iget-object v2, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->queue:Lrx/internal/util/unsafe/SpscArrayQueue;
|
|
|
|
invoke-virtual {v2}, Lrx/internal/util/unsafe/SpscArrayQueue;->poll()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lrx/Completable;
|
|
|
|
.local v0, "c":Lrx/Completable;
|
|
if-nez v0, :cond_2
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
iget-object v2, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->once:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
invoke-virtual {v2, v3, v4}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
iget-object v2, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->actual:Lrx/Completable$CompletableSubscriber;
|
|
|
|
invoke-interface {v2}, Lrx/Completable$CompletableSubscriber;->onCompleted()V
|
|
|
|
:cond_0
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_1
|
|
invoke-static {}, Lrx/plugins/RxJavaPlugins;->getInstance()Lrx/plugins/RxJavaPlugins;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lrx/plugins/RxJavaPlugins;->getErrorHandler()Lrx/plugins/RxJavaErrorHandler;
|
|
|
|
move-result-object v2
|
|
|
|
new-instance v3, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v4, "Queue is empty?!"
|
|
|
|
invoke-direct {v3, v4}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v2, v3}, Lrx/plugins/RxJavaErrorHandler;->handleError(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
iget-object v2, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->inner:Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber$ConcatInnerSubscriber;
|
|
|
|
invoke-virtual {v0, v2}, Lrx/Completable;->unsafeSubscribe(Lrx/Completable$CompletableSubscriber;)V
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public onCompleted()V
|
|
.locals 1
|
|
|
|
.prologue
|
|
iget-boolean v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->done:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_1
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->done:Z
|
|
|
|
iget-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->wip:Ljava/util/concurrent/atomic/AtomicInteger;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->next()V
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public onError(Ljava/lang/Throwable;)V
|
|
.locals 3
|
|
.param p1, "t" # Ljava/lang/Throwable;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->once:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->actual:Lrx/Completable$CompletableSubscriber;
|
|
|
|
invoke-interface {v0, p1}, Lrx/Completable$CompletableSubscriber;->onError(Ljava/lang/Throwable;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-static {}, Lrx/plugins/RxJavaPlugins;->getInstance()Lrx/plugins/RxJavaPlugins;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/plugins/RxJavaPlugins;->getErrorHandler()Lrx/plugins/RxJavaErrorHandler;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Lrx/plugins/RxJavaErrorHandler;->handleError(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public bridge synthetic onNext(Ljava/lang/Object;)V
|
|
.locals 0
|
|
.param p1, "x0" # Ljava/lang/Object;
|
|
|
|
.prologue
|
|
check-cast p1, Lrx/Completable;
|
|
|
|
.end local p1 # "x0":Ljava/lang/Object;
|
|
invoke-virtual {p0, p1}, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->onNext(Lrx/Completable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onNext(Lrx/Completable;)V
|
|
.locals 1
|
|
.param p1, "t" # Lrx/Completable;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->queue:Lrx/internal/util/unsafe/SpscArrayQueue;
|
|
|
|
invoke-virtual {v0, p1}, Lrx/internal/util/unsafe/SpscArrayQueue;->offer(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
new-instance v0, Lrx/exceptions/MissingBackpressureException;
|
|
|
|
invoke-direct {v0}, Lrx/exceptions/MissingBackpressureException;-><init>()V
|
|
|
|
invoke-virtual {p0, v0}, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->onError(Ljava/lang/Throwable;)V
|
|
|
|
:cond_0
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->wip:Ljava/util/concurrent/atomic/AtomicInteger;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lrx/internal/operators/CompletableOnSubscribeConcat$CompletableConcatSubscriber;->next()V
|
|
|
|
goto :goto_0
|
|
.end method
|