OperatorMerge$InnerSubscriber.smali
.class final Lrx/internal/operators/OperatorMerge$InnerSubscriber;
.super Lrx/Subscriber;
.source "OperatorMerge.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lrx/internal/operators/OperatorMerge;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x18
name = "InnerSubscriber"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Lrx/Subscriber<",
"TT;>;"
}
.end annotation
# static fields
.field static final LIMIT:I
# instance fields
.field volatile done:Z
.field final id:J
.field outstanding:I
.field final parent:Lrx/internal/operators/OperatorMerge$MergeSubscriber;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/internal/operators/OperatorMerge$MergeSubscriber<",
"TT;>;"
}
.end annotation
.end field
.field volatile queue:Lrx/internal/util/RxRingBuffer;
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 1
sget v0, Lrx/internal/util/RxRingBuffer;->SIZE:I
div-int/lit8 v0, v0, 0x4
sput v0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->LIMIT:I
return-void
.end method
.method public constructor <init>(Lrx/internal/operators/OperatorMerge$MergeSubscriber;J)V
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/internal/operators/OperatorMerge$MergeSubscriber<",
"TT;>;J)V"
}
.end annotation
.line 1
invoke-direct {p0}, Lrx/Subscriber;-><init>()V
.line 2
iput-object p1, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->parent:Lrx/internal/operators/OperatorMerge$MergeSubscriber;
.line 3
iput-wide p2, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->id:J
return-void
.end method
# virtual methods
.method public onCompleted()V
.registers 2
const/4 v0, 0x1
.line 1
iput-boolean v0, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->done:Z
.line 2
iget-object v0, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->parent:Lrx/internal/operators/OperatorMerge$MergeSubscriber;
invoke-virtual {v0}, Lrx/internal/operators/OperatorMerge$MergeSubscriber;->emit()V
return-void
.end method
.method public onError(Ljava/lang/Throwable;)V
.registers 3
const/4 v0, 0x1
.line 1
iput-boolean v0, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->done:Z
.line 2
iget-object v0, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->parent:Lrx/internal/operators/OperatorMerge$MergeSubscriber;
invoke-virtual {v0}, Lrx/internal/operators/OperatorMerge$MergeSubscriber;->getOrCreateErrorQueue()Ljava/util/Queue;
move-result-object v0
invoke-interface {v0, p1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z
.line 3
iget-object p1, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->parent:Lrx/internal/operators/OperatorMerge$MergeSubscriber;
invoke-virtual {p1}, Lrx/internal/operators/OperatorMerge$MergeSubscriber;->emit()V
return-void
.end method
.method public onNext(Ljava/lang/Object;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->parent:Lrx/internal/operators/OperatorMerge$MergeSubscriber;
invoke-virtual {v0, p0, p1}, Lrx/internal/operators/OperatorMerge$MergeSubscriber;->tryEmit(Lrx/internal/operators/OperatorMerge$InnerSubscriber;Ljava/lang/Object;)V
return-void
.end method
.method public onStart()V
.registers 3
.line 1
sget v0, Lrx/internal/util/RxRingBuffer;->SIZE:I
iput v0, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->outstanding:I
int-to-long v0, v0
.line 2
invoke-virtual {p0, v0, v1}, Lrx/Subscriber;->request(J)V
return-void
.end method
.method public requestMore(J)V
.registers 4
.line 1
iget v0, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->outstanding:I
long-to-int p2, p1
sub-int/2addr v0, p2
.line 2
sget p1, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->LIMIT:I
if-le v0, p1, :cond_b
.line 3
iput v0, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->outstanding:I
return-void
.line 4
:cond_b
sget p1, Lrx/internal/util/RxRingBuffer;->SIZE:I
iput p1, p0, Lrx/internal/operators/OperatorMerge$InnerSubscriber;->outstanding:I
sub-int/2addr p1, v0
if-lez p1, :cond_16
int-to-long p1, p1
.line 5
invoke-virtual {p0, p1, p2}, Lrx/Subscriber;->request(J)V
:cond_16
return-void
.end method