FlowableBufferBoundary$BufferBoundarySubscriber.smali
.class final Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;
.super Lio/reactivex/internal/subscribers/QueueDrainSubscriber;
.source "FlowableBufferBoundary.java"
# interfaces
.implements Lorg/reactivestreams/Subscription;
.implements Lio/reactivex/disposables/Disposable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x18
name = "BufferBoundarySubscriber"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"U::",
"Ljava/util/Collection<",
"-TT;>;Open:",
"Ljava/lang/Object;",
"Close:",
"Ljava/lang/Object;",
">",
"Lio/reactivex/internal/subscribers/QueueDrainSubscriber<",
"TT;TU;TU;>;",
"Lorg/reactivestreams/Subscription;",
"Lio/reactivex/disposables/Disposable;"
}
.end annotation
# instance fields
.field final bufferClose:Lio/reactivex/functions/Function;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lio/reactivex/functions/Function<",
"-TOpen;+",
"Lorg/reactivestreams/Publisher<",
"+TClose;>;>;"
}
.end annotation
.end field
.field final bufferOpen:Lorg/reactivestreams/Publisher;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lorg/reactivestreams/Publisher<",
"+TOpen;>;"
}
.end annotation
.end field
.field final bufferSupplier:Ljava/util/concurrent/Callable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/Callable<",
"TU;>;"
}
.end annotation
.end field
.field final buffers:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"TU;>;"
}
.end annotation
.end field
.field final resources:Lio/reactivex/disposables/CompositeDisposable;
.field s:Lorg/reactivestreams/Subscription;
.field final windows:Ljava/util/concurrent/atomic/AtomicInteger;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method constructor <init>(Lorg/reactivestreams/Subscriber;Lorg/reactivestreams/Publisher;Lio/reactivex/functions/Function;Ljava/util/concurrent/Callable;)V
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lorg/reactivestreams/Subscriber<",
"-TU;>;",
"Lorg/reactivestreams/Publisher<",
"+TOpen;>;",
"Lio/reactivex/functions/Function<",
"-TOpen;+",
"Lorg/reactivestreams/Publisher<",
"+TClose;>;>;",
"Ljava/util/concurrent/Callable<",
"TU;>;)V"
}
.end annotation
.line 74
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
.local p1, "actual":Lorg/reactivestreams/Subscriber;, "Lorg/reactivestreams/Subscriber<-TU;>;"
.local p2, "bufferOpen":Lorg/reactivestreams/Publisher;, "Lorg/reactivestreams/Publisher<+TOpen;>;"
.local p3, "bufferClose":Lio/reactivex/functions/Function;, "Lio/reactivex/functions/Function<-TOpen;+Lorg/reactivestreams/Publisher<+TClose;>;>;"
.local p4, "bufferSupplier":Ljava/util/concurrent/Callable;, "Ljava/util/concurrent/Callable<TU;>;"
new-instance v0, Lio/reactivex/internal/queue/MpscLinkedQueue;
invoke-direct {v0}, Lio/reactivex/internal/queue/MpscLinkedQueue;-><init>()V
invoke-direct {p0, p1, v0}, Lio/reactivex/internal/subscribers/QueueDrainSubscriber;-><init>(Lorg/reactivestreams/Subscriber;Lio/reactivex/internal/fuseable/SimplePlainQueue;)V
.line 68
new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>()V
iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->windows:Ljava/util/concurrent/atomic/AtomicInteger;
.line 75
iput-object p2, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferOpen:Lorg/reactivestreams/Publisher;
.line 76
iput-object p3, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferClose:Lio/reactivex/functions/Function;
.line 77
iput-object p4, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferSupplier:Ljava/util/concurrent/Callable;
.line 78
new-instance v0, Ljava/util/LinkedList;
invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V
iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/List;
.line 79
new-instance v0, Lio/reactivex/disposables/CompositeDisposable;
invoke-direct {v0}, Lio/reactivex/disposables/CompositeDisposable;-><init>()V
iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->resources:Lio/reactivex/disposables/CompositeDisposable;
.line 80
return-void
.end method
# virtual methods
.method public bridge synthetic accept(Lorg/reactivestreams/Subscriber;Ljava/lang/Object;)Z
.registers 3
.line 57
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
check-cast p2, Ljava/util/Collection;
invoke-virtual {p0, p1, p2}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->accept(Lorg/reactivestreams/Subscriber;Ljava/util/Collection;)Z
move-result p1
return p1
.end method
.method public accept(Lorg/reactivestreams/Subscriber;Ljava/util/Collection;)Z
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lorg/reactivestreams/Subscriber<",
"-TU;>;TU;)Z"
}
.end annotation
.line 166
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
.local p1, "a":Lorg/reactivestreams/Subscriber;, "Lorg/reactivestreams/Subscriber<-TU;>;"
.local p2, "v":Ljava/util/Collection;, "TU;"
invoke-interface {p1, p2}, Lorg/reactivestreams/Subscriber;->onNext(Ljava/lang/Object;)V
.line 167
const/4 v0, 0x1
return v0
.end method
.method public cancel()V
.registers 2
.line 158
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->cancelled:Z
if-nez v0, :cond_a
.line 159
const/4 v0, 0x1
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->cancelled:Z
.line 160
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->dispose()V
.line 162
:cond_a
return-void
.end method
.method close(Ljava/util/Collection;Lio/reactivex/disposables/Disposable;)V
.registers 5
.param p2, "d" # Lio/reactivex/disposables/Disposable;
.annotation system Ldalvik/annotation/Signature;
value = {
"(TU;",
"Lio/reactivex/disposables/Disposable;",
")V"
}
.end annotation
.line 225
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
.local p1, "b":Ljava/util/Collection;, "TU;"
monitor-enter p0
.line 226
:try_start_1
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
move-result v0
.line 227
.local v0, "e":Z
monitor-exit p0
:try_end_8
.catchall {:try_start_1 .. :try_end_8} :catchall_22
.line 229
if-eqz v0, :cond_e
.line 230
const/4 v1, 0x0
invoke-virtual {p0, p1, v1, p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->fastPathOrderedEmitMax(Ljava/lang/Object;ZLio/reactivex/disposables/Disposable;)V
.line 233
:cond_e
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->resources:Lio/reactivex/disposables/CompositeDisposable;
invoke-virtual {v1, p2}, Lio/reactivex/disposables/CompositeDisposable;->remove(Lio/reactivex/disposables/Disposable;)Z
move-result v1
if-eqz v1, :cond_21
.line 234
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->windows:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicInteger;->decrementAndGet()I
move-result v1
if-nez v1, :cond_21
.line 235
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->complete()V
.line 238
:cond_21
return-void
.line 227
.end local v0 # "e":Z
:catchall_22
move-exception v0
:try_start_23
monitor-exit p0
:try_end_24
.catchall {:try_start_23 .. :try_end_24} :catchall_22
throw v0
.end method
.method complete()V
.registers 5
.line 126
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
monitor-enter p0
.line 127
:try_start_1
new-instance v0, Ljava/util/ArrayList;
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/List;
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
.line 128
.local v0, "list":Ljava/util/List;, "Ljava/util/List<TU;>;"
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->clear()V
.line 129
monitor-exit p0
:try_end_e
.catchall {:try_start_1 .. :try_end_e} :catchall_34
.line 131
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->queue:Lio/reactivex/internal/fuseable/SimplePlainQueue;
.line 132
.local v1, "q":Lio/reactivex/internal/fuseable/SimplePlainQueue;, "Lio/reactivex/internal/fuseable/SimplePlainQueue<TU;>;"
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_14
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_24
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/util/Collection;
.line 133
.local v3, "u":Ljava/util/Collection;, "TU;"
invoke-interface {v1, v3}, Lio/reactivex/internal/fuseable/SimplePlainQueue;->offer(Ljava/lang/Object;)Z
.line 134
.end local v3 # "u":Ljava/util/Collection;, "TU;"
goto :goto_14
.line 135
:cond_24
const/4 v2, 0x1
iput-boolean v2, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->done:Z
.line 136
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->enter()Z
move-result v2
if-eqz v2, :cond_33
.line 137
iget-object v2, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->actual:Lorg/reactivestreams/Subscriber;
const/4 v3, 0x0
invoke-static {v1, v2, v3, p0, p0}, Lio/reactivex/internal/util/QueueDrainHelper;->drainMaxLoop(Lio/reactivex/internal/fuseable/SimplePlainQueue;Lorg/reactivestreams/Subscriber;ZLio/reactivex/disposables/Disposable;Lio/reactivex/internal/util/QueueDrain;)V
.line 139
:cond_33
return-void
.line 129
.end local v0 # "list":Ljava/util/List;, "Ljava/util/List<TU;>;"
.end local v1 # "q":Lio/reactivex/internal/fuseable/SimplePlainQueue;, "Lio/reactivex/internal/fuseable/SimplePlainQueue<TU;>;"
:catchall_34
move-exception v0
:try_start_35
monitor-exit p0
:try_end_36
.catchall {:try_start_35 .. :try_end_36} :catchall_34
goto :goto_38
:goto_37
throw v0
:goto_38
goto :goto_37
.end method
.method public dispose()V
.registers 2
.line 148
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->resources:Lio/reactivex/disposables/CompositeDisposable;
invoke-virtual {v0}, Lio/reactivex/disposables/CompositeDisposable;->dispose()V
.line 149
return-void
.end method
.method public isDisposed()Z
.registers 2
.line 153
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->resources:Lio/reactivex/disposables/CompositeDisposable;
invoke-virtual {v0}, Lio/reactivex/disposables/CompositeDisposable;->isDisposed()Z
move-result v0
return v0
.end method
.method public onComplete()V
.registers 2
.line 119
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->windows:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->decrementAndGet()I
move-result v0
if-nez v0, :cond_b
.line 120
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->complete()V
.line 122
:cond_b
return-void
.end method
.method public onError(Ljava/lang/Throwable;)V
.registers 3
.param p1, "t" # Ljava/lang/Throwable;
.line 109
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->cancel()V
.line 110
const/4 v0, 0x1
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->cancelled:Z
.line 111
monitor-enter p0
.line 112
:try_start_7
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->clear()V
.line 113
monitor-exit p0
:try_end_d
.catchall {:try_start_7 .. :try_end_d} :catchall_13
.line 114
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-interface {v0, p1}, Lorg/reactivestreams/Subscriber;->onError(Ljava/lang/Throwable;)V
.line 115
return-void
.line 113
:catchall_13
move-exception v0
:try_start_14
monitor-exit p0
:try_end_15
.catchall {:try_start_14 .. :try_end_15} :catchall_13
throw v0
.end method
.method public onNext(Ljava/lang/Object;)V
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 100
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
.local p1, "t":Ljava/lang/Object;, "TT;"
monitor-enter p0
.line 101
:try_start_1
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_7
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_18
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/util/Collection;
.line 102
.local v1, "b":Ljava/util/Collection;, "TU;"
invoke-interface {v1, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
.line 103
nop
.end local v1 # "b":Ljava/util/Collection;, "TU;"
goto :goto_7
.line 104
:cond_18
monitor-exit p0
.line 105
return-void
.line 104
:catchall_1a
move-exception v0
monitor-exit p0
:try_end_1c
.catchall {:try_start_1 .. :try_end_1c} :catchall_1a
goto :goto_1e
:goto_1d
throw v0
:goto_1e
goto :goto_1d
.end method
.method public onSubscribe(Lorg/reactivestreams/Subscription;)V
.registers 5
.param p1, "s" # Lorg/reactivestreams/Subscription;
.line 83
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->s:Lorg/reactivestreams/Subscription;
invoke-static {v0, p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(Lorg/reactivestreams/Subscription;Lorg/reactivestreams/Subscription;)Z
move-result v0
if-eqz v0, :cond_2c
.line 84
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->s:Lorg/reactivestreams/Subscription;
.line 86
new-instance v0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferOpenSubscriber;
invoke-direct {v0, p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferOpenSubscriber;-><init>(Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;)V
.line 87
.local v0, "bos":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferOpenSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferOpenSubscriber<TT;TU;TOpen;TClose;>;"
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->resources:Lio/reactivex/disposables/CompositeDisposable;
invoke-virtual {v1, v0}, Lio/reactivex/disposables/CompositeDisposable;->add(Lio/reactivex/disposables/Disposable;)Z
.line 89
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-interface {v1, p0}, Lorg/reactivestreams/Subscriber;->onSubscribe(Lorg/reactivestreams/Subscription;)V
.line 91
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->windows:Ljava/util/concurrent/atomic/AtomicInteger;
const/4 v2, 0x1
invoke-virtual {v1, v2}, Ljava/util/concurrent/atomic/AtomicInteger;->lazySet(I)V
.line 92
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferOpen:Lorg/reactivestreams/Publisher;
invoke-interface {v1, v0}, Lorg/reactivestreams/Publisher;->subscribe(Lorg/reactivestreams/Subscriber;)V
.line 94
const-wide v1, 0x7fffffffffffffffL
invoke-interface {p1, v1, v2}, Lorg/reactivestreams/Subscription;->request(J)V
.line 96
.end local v0 # "bos":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferOpenSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferOpenSubscriber<TT;TU;TOpen;TClose;>;"
:cond_2c
return-void
.end method
.method open(Ljava/lang/Object;)V
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(TOpen;)V"
}
.end annotation
.line 171
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
.local p1, "window":Ljava/lang/Object;, "TOpen;"
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->cancelled:Z
if-eqz v0, :cond_5
.line 172
return-void
.line 178
:cond_5
:try_start_5
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferSupplier:Ljava/util/concurrent/Callable;
invoke-interface {v0}, Ljava/util/concurrent/Callable;->call()Ljava/lang/Object;
move-result-object v0
const-string v1, "The buffer supplied is null"
invoke-static {v0, v1}, Lio/reactivex/internal/functions/ObjectHelper;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Collection;
:try_end_13
.catchall {:try_start_5 .. :try_end_13} :catchall_53
.line 183
.local v0, "b":Ljava/util/Collection;, "TU;"
nop
.line 188
:try_start_14
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->bufferClose:Lio/reactivex/functions/Function;
invoke-interface {v1, p1}, Lio/reactivex/functions/Function;->apply(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
const-string v2, "The buffer closing publisher is null"
invoke-static {v1, v2}, Lio/reactivex/internal/functions/ObjectHelper;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lorg/reactivestreams/Publisher;
:try_end_22
.catchall {:try_start_14 .. :try_end_22} :catchall_4b
.line 193
.local v1, "p":Lorg/reactivestreams/Publisher;, "Lorg/reactivestreams/Publisher<+TClose;>;"
nop
.line 195
iget-boolean v2, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->cancelled:Z
if-eqz v2, :cond_28
.line 196
return-void
.line 199
:cond_28
monitor-enter p0
.line 200
:try_start_29
iget-boolean v2, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->cancelled:Z
if-eqz v2, :cond_2f
.line 201
monitor-exit p0
return-void
.line 203
:cond_2f
iget-object v2, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->buffers:Ljava/util/List;
invoke-interface {v2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 204
monitor-exit p0
:try_end_35
.catchall {:try_start_29 .. :try_end_35} :catchall_48
.line 206
new-instance v2, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferCloseSubscriber;
invoke-direct {v2, v0, p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferCloseSubscriber;-><init>(Ljava/util/Collection;Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;)V
.line 207
.local v2, "bcs":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferCloseSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferCloseSubscriber<TT;TU;TOpen;TClose;>;"
iget-object v3, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->resources:Lio/reactivex/disposables/CompositeDisposable;
invoke-virtual {v3, v2}, Lio/reactivex/disposables/CompositeDisposable;->add(Lio/reactivex/disposables/Disposable;)Z
.line 209
iget-object v3, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->windows:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v3}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I
.line 211
invoke-interface {v1, v2}, Lorg/reactivestreams/Publisher;->subscribe(Lorg/reactivestreams/Subscriber;)V
.line 212
return-void
.line 204
.end local v2 # "bcs":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferCloseSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferCloseSubscriber<TT;TU;TOpen;TClose;>;"
:catchall_48
move-exception v2
:try_start_49
monitor-exit p0
:try_end_4a
.catchall {:try_start_49 .. :try_end_4a} :catchall_48
throw v2
.line 189
.end local v1 # "p":Lorg/reactivestreams/Publisher;, "Lorg/reactivestreams/Publisher<+TClose;>;"
:catchall_4b
move-exception v1
.line 190
.local v1, "e":Ljava/lang/Throwable;
invoke-static {v1}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
.line 191
invoke-virtual {p0, v1}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->onError(Ljava/lang/Throwable;)V
.line 192
return-void
.line 179
.end local v0 # "b":Ljava/util/Collection;, "TU;"
.end local v1 # "e":Ljava/lang/Throwable;
:catchall_53
move-exception v0
.line 180
.local v0, "e":Ljava/lang/Throwable;
invoke-static {v0}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
.line 181
invoke-virtual {p0, v0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->onError(Ljava/lang/Throwable;)V
.line 182
return-void
.end method
.method openFinished(Lio/reactivex/disposables/Disposable;)V
.registers 3
.param p1, "d" # Lio/reactivex/disposables/Disposable;
.line 215
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->resources:Lio/reactivex/disposables/CompositeDisposable;
invoke-virtual {v0, p1}, Lio/reactivex/disposables/CompositeDisposable;->remove(Lio/reactivex/disposables/Disposable;)Z
move-result v0
if-eqz v0, :cond_13
.line 216
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->windows:Ljava/util/concurrent/atomic/AtomicInteger;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->decrementAndGet()I
move-result v0
if-nez v0, :cond_13
.line 217
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->complete()V
.line 220
:cond_13
return-void
.end method
.method public request(J)V
.registers 3
.param p1, "n" # J
.line 143
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber<TT;TU;TOpen;TClose;>;"
invoke-virtual {p0, p1, p2}, Lio/reactivex/internal/operators/flowable/FlowableBufferBoundary$BufferBoundarySubscriber;->requested(J)V
.line 144
return-void
.end method