784 lines
20 KiB
Smali
784 lines
20 KiB
Smali
.class final Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;
|
|
.super Lio/reactivex/internal/subscriptions/BasicIntQueueSubscription;
|
|
.source "FlowableGroupBy.java"
|
|
|
|
# interfaces
|
|
.implements Lok/c;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lio/reactivex/internal/operators/flowable/FlowableGroupBy;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "State"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
"K:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Lio/reactivex/internal/subscriptions/BasicIntQueueSubscription<",
|
|
"TT;>;",
|
|
"Lok/c<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final serialVersionUID:J = -0x35762a4bbab31538L
|
|
|
|
|
|
# instance fields
|
|
.field public final actual:Ljava/util/concurrent/atomic/AtomicReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lok/d<",
|
|
"-TT;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final cancelled:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.field public final delayError:Z
|
|
|
|
.field public volatile done:Z
|
|
|
|
.field public error:Ljava/lang/Throwable;
|
|
|
|
.field public final key:Ljava/lang/Object;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"TK;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final once:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.field public outputFused:Z
|
|
|
|
.field public final parent:Lio/reactivex/internal/operators/flowable/FlowableGroupBy$GroupBySubscriber;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lio/reactivex/internal/operators/flowable/FlowableGroupBy$GroupBySubscriber<",
|
|
"*TK;TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public produced:I
|
|
|
|
.field public final queue:Lio/reactivex/internal/queue/a;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lio/reactivex/internal/queue/a<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final requested:Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(ILio/reactivex/internal/operators/flowable/FlowableGroupBy$GroupBySubscriber;Ljava/lang/Object;Z)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I",
|
|
"Lio/reactivex/internal/operators/flowable/FlowableGroupBy$GroupBySubscriber<",
|
|
"*TK;TT;>;TK;Z)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lio/reactivex/internal/subscriptions/BasicIntQueueSubscription;-><init>()V
|
|
|
|
.line 2
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
|
|
|
|
iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->requested:Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
.line 3
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>()V
|
|
|
|
iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->cancelled:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.line 4
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
|
|
|
|
iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->actual:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
.line 5
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>()V
|
|
|
|
iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->once:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.line 6
|
|
new-instance v0, Lio/reactivex/internal/queue/a;
|
|
|
|
invoke-direct {v0, p1}, Lio/reactivex/internal/queue/a;-><init>(I)V
|
|
|
|
iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->queue:Lio/reactivex/internal/queue/a;
|
|
|
|
.line 7
|
|
iput-object p2, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->parent:Lio/reactivex/internal/operators/flowable/FlowableGroupBy$GroupBySubscriber;
|
|
|
|
.line 8
|
|
iput-object p3, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->key:Ljava/lang/Object;
|
|
|
|
.line 9
|
|
iput-boolean p4, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->delayError:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public cancel()V
|
|
.locals 3
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->cancelled: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
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->parent:Lio/reactivex/internal/operators/flowable/FlowableGroupBy$GroupBySubscriber;
|
|
|
|
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->key:Ljava/lang/Object;
|
|
|
|
invoke-virtual {v0, v1}, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$GroupBySubscriber;->cancel(Ljava/lang/Object;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public checkTerminated(ZZLok/d;Z)Z
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(ZZ",
|
|
"Lok/d<",
|
|
"-TT;>;Z)Z"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->cancelled:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->queue:Lio/reactivex/internal/queue/a;
|
|
|
|
invoke-virtual {p1}, Lio/reactivex/internal/queue/a;->clear()V
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
if-eqz p1, :cond_4
|
|
|
|
if-eqz p4, :cond_2
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
.line 3
|
|
iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->error:Ljava/lang/Throwable;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 4
|
|
invoke-interface {p3, p1}, Lok/d;->onError(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_1
|
|
invoke-interface {p3}, Lok/d;->onComplete()V
|
|
|
|
:goto_0
|
|
return v1
|
|
|
|
.line 6
|
|
:cond_2
|
|
iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->error:Ljava/lang/Throwable;
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
.line 7
|
|
iget-object p2, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->queue:Lio/reactivex/internal/queue/a;
|
|
|
|
invoke-virtual {p2}, Lio/reactivex/internal/queue/a;->clear()V
|
|
|
|
.line 8
|
|
invoke-interface {p3, p1}, Lok/d;->onError(Ljava/lang/Throwable;)V
|
|
|
|
return v1
|
|
|
|
:cond_3
|
|
if-eqz p2, :cond_4
|
|
|
|
.line 9
|
|
invoke-interface {p3}, Lok/d;->onComplete()V
|
|
|
|
return v1
|
|
|
|
:cond_4
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public clear()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->queue:Lio/reactivex/internal/queue/a;
|
|
|
|
invoke-virtual {v0}, Lio/reactivex/internal/queue/a;->clear()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public drain()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 2
|
|
:cond_0
|
|
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->outputFused:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->drainFused()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_1
|
|
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->drainNormal()V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public drainFused()V
|
|
.locals 5
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->queue:Lio/reactivex/internal/queue/a;
|
|
|
|
.line 2
|
|
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->actual:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lok/d;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
if-eqz v1, :cond_4
|
|
|
|
.line 3
|
|
iget-object v3, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->cancelled:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
.line 4
|
|
invoke-virtual {v0}, Lio/reactivex/internal/queue/a;->clear()V
|
|
|
|
return-void
|
|
|
|
.line 5
|
|
:cond_1
|
|
iget-boolean v3, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->done:Z
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
.line 6
|
|
iget-boolean v4, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->delayError:Z
|
|
|
|
if-nez v4, :cond_2
|
|
|
|
.line 7
|
|
iget-object v4, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->error:Ljava/lang/Throwable;
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
.line 8
|
|
invoke-virtual {v0}, Lio/reactivex/internal/queue/a;->clear()V
|
|
|
|
.line 9
|
|
invoke-interface {v1, v4}, Lok/d;->onError(Ljava/lang/Throwable;)V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
const/4 v4, 0x0
|
|
|
|
.line 10
|
|
invoke-interface {v1, v4}, Lok/d;->onNext(Ljava/lang/Object;)V
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
.line 11
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->error:Ljava/lang/Throwable;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 12
|
|
invoke-interface {v1, v0}, Lok/d;->onError(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 13
|
|
:cond_3
|
|
invoke-interface {v1}, Lok/d;->onComplete()V
|
|
|
|
:goto_1
|
|
return-void
|
|
|
|
:cond_4
|
|
neg-int v2, v2
|
|
|
|
.line 14
|
|
invoke-virtual {p0, v2}, Ljava/util/concurrent/atomic/AtomicInteger;->addAndGet(I)I
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_5
|
|
|
|
return-void
|
|
|
|
:cond_5
|
|
if-nez v1, :cond_0
|
|
|
|
.line 15
|
|
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->actual:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lok/d;
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public drainNormal()V
|
|
.locals 15
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->queue:Lio/reactivex/internal/queue/a;
|
|
|
|
.line 2
|
|
iget-boolean v1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->delayError:Z
|
|
|
|
.line 3
|
|
iget-object v2, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->actual:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-virtual {v2}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lok/d;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
move v4, v3
|
|
|
|
:cond_0
|
|
:goto_0
|
|
if-eqz v2, :cond_7
|
|
|
|
.line 4
|
|
iget-object v5, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->requested:Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
invoke-virtual {v5}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
|
|
|
|
move-result-wide v5
|
|
|
|
const-wide/16 v7, 0x0
|
|
|
|
move-wide v9, v7
|
|
|
|
:goto_1
|
|
cmp-long v11, v9, v5
|
|
|
|
if-eqz v11, :cond_4
|
|
|
|
.line 5
|
|
iget-boolean v12, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->done:Z
|
|
|
|
.line 6
|
|
invoke-virtual {v0}, Lio/reactivex/internal/queue/a;->poll()Ljava/lang/Object;
|
|
|
|
move-result-object v13
|
|
|
|
if-nez v13, :cond_1
|
|
|
|
move v14, v3
|
|
|
|
goto :goto_2
|
|
|
|
:cond_1
|
|
const/4 v14, 0x0
|
|
|
|
.line 7
|
|
:goto_2
|
|
invoke-virtual {p0, v12, v14, v2, v1}, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->checkTerminated(ZZLok/d;Z)Z
|
|
|
|
move-result v12
|
|
|
|
if-eqz v12, :cond_2
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
if-eqz v14, :cond_3
|
|
|
|
goto :goto_3
|
|
|
|
.line 8
|
|
:cond_3
|
|
invoke-interface {v2, v13}, Lok/d;->onNext(Ljava/lang/Object;)V
|
|
|
|
const-wide/16 v11, 0x1
|
|
|
|
add-long/2addr v9, v11
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
:goto_3
|
|
if-nez v11, :cond_5
|
|
|
|
.line 9
|
|
iget-boolean v11, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->done:Z
|
|
|
|
invoke-virtual {v0}, Lio/reactivex/internal/queue/a;->isEmpty()Z
|
|
|
|
move-result v12
|
|
|
|
invoke-virtual {p0, v11, v12, v2, v1}, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->checkTerminated(ZZLok/d;Z)Z
|
|
|
|
move-result v11
|
|
|
|
if-eqz v11, :cond_5
|
|
|
|
return-void
|
|
|
|
:cond_5
|
|
cmp-long v7, v9, v7
|
|
|
|
if-eqz v7, :cond_7
|
|
|
|
const-wide v7, 0x7fffffffffffffffL
|
|
|
|
cmp-long v5, v5, v7
|
|
|
|
if-eqz v5, :cond_6
|
|
|
|
.line 10
|
|
iget-object v5, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->requested:Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
neg-long v6, v9
|
|
|
|
invoke-virtual {v5, v6, v7}, Ljava/util/concurrent/atomic/AtomicLong;->addAndGet(J)J
|
|
|
|
.line 11
|
|
:cond_6
|
|
iget-object v5, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->parent:Lio/reactivex/internal/operators/flowable/FlowableGroupBy$GroupBySubscriber;
|
|
|
|
iget-object v5, v5, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$GroupBySubscriber;->upstream:Lok/e;
|
|
|
|
invoke-interface {v5, v9, v10}, Lok/e;->request(J)V
|
|
|
|
:cond_7
|
|
neg-int v4, v4
|
|
|
|
.line 12
|
|
invoke-virtual {p0, v4}, Ljava/util/concurrent/atomic/AtomicInteger;->addAndGet(I)I
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_8
|
|
|
|
return-void
|
|
|
|
:cond_8
|
|
if-nez v2, :cond_0
|
|
|
|
.line 13
|
|
iget-object v2, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->actual:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-virtual {v2}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lok/d;
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public isEmpty()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->queue:Lio/reactivex/internal/queue/a;
|
|
|
|
invoke-virtual {v0}, Lio/reactivex/internal/queue/a;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onComplete()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 1
|
|
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->done:Z
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->drain()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onError(Ljava/lang/Throwable;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->error:Ljava/lang/Throwable;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 2
|
|
iput-boolean p1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->done:Z
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->drain()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onNext(Ljava/lang/Object;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->queue:Lio/reactivex/internal/queue/a;
|
|
|
|
invoke-virtual {v0, p1}, Lio/reactivex/internal/queue/a;->offer(Ljava/lang/Object;)Z
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->drain()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public poll()Ljava/lang/Object;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lio/reactivex/annotations/Nullable;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->queue:Lio/reactivex/internal/queue/a;
|
|
|
|
invoke-virtual {v0}, Lio/reactivex/internal/queue/a;->poll()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
iget v1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->produced:I
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
iput v1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->produced:I
|
|
|
|
return-object v0
|
|
|
|
.line 3
|
|
:cond_0
|
|
iget v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->produced:I
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 4
|
|
iput v1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->produced:I
|
|
|
|
.line 5
|
|
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->parent:Lio/reactivex/internal/operators/flowable/FlowableGroupBy$GroupBySubscriber;
|
|
|
|
iget-object v1, v1, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$GroupBySubscriber;->upstream:Lok/e;
|
|
|
|
int-to-long v2, v0
|
|
|
|
invoke-interface {v1, v2, v3}, Lok/e;->request(J)V
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public request(J)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-static {p1, p2}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(J)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->requested:Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
invoke-static {v0, p1, p2}, Lio/reactivex/internal/util/b;->a(Ljava/util/concurrent/atomic/AtomicLong;J)J
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->drain()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public requestFusion(I)I
|
|
.locals 1
|
|
|
|
const/4 v0, 0x2
|
|
|
|
and-int/2addr p1, v0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 1
|
|
iput-boolean p1, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->outputFused:Z
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public subscribe(Lok/d;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lok/d<",
|
|
"-TT;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->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
|
|
|
|
.line 2
|
|
invoke-interface {p1, p0}, Lok/d;->onSubscribe(Lok/e;)V
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->actual:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V
|
|
|
|
.line 4
|
|
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableGroupBy$State;->drain()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "Only one Subscriber allowed!"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {v0, p1}, Lio/reactivex/internal/subscriptions/EmptySubscription;->error(Ljava/lang/Throwable;Lok/d;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|