123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603 |
- .class final Lio/reactivex/subjects/SerializedSubject;
- .super Lio/reactivex/subjects/Subject;
- .source "SerializedSubject.java"
- # interfaces
- .implements Lio/reactivex/internal/util/AppendOnlyLinkedArrayList$NonThrowingPredicate;
- # annotations
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">",
- "Lio/reactivex/subjects/Subject<",
- "TT;>;",
- "Lio/reactivex/internal/util/AppendOnlyLinkedArrayList$NonThrowingPredicate<",
- "Ljava/lang/Object;",
- ">;"
- }
- .end annotation
- # instance fields
- .field final actual:Lio/reactivex/subjects/Subject;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Lio/reactivex/subjects/Subject<",
- "TT;>;"
- }
- .end annotation
- .end field
- .field volatile done:Z
- .field emitting:Z
- .field queue:Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Lio/reactivex/internal/util/AppendOnlyLinkedArrayList<",
- "Ljava/lang/Object;",
- ">;"
- }
- .end annotation
- .end field
- # direct methods
- .method constructor <init>(Lio/reactivex/subjects/Subject;)V
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lio/reactivex/subjects/Subject<",
- "TT;>;)V"
- }
- .end annotation
- .line 42
- invoke-direct {p0}, Lio/reactivex/subjects/Subject;-><init>()V
- .line 43
- iput-object p1, p0, Lio/reactivex/subjects/SerializedSubject;->actual:Lio/reactivex/subjects/Subject;
- return-void
- .end method
- # virtual methods
- .method emitLoop()V
- .locals 2
- .line 168
- :goto_0
- monitor-enter p0
- .line 169
- :try_start_0
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->queue:Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- if-nez v0, :cond_0
- const/4 v0, 0x0
- .line 171
- iput-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->emitting:Z
- .line 172
- monitor-exit p0
- return-void
- :cond_0
- const/4 v1, 0x0
- .line 174
- iput-object v1, p0, Lio/reactivex/subjects/SerializedSubject;->queue:Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- .line 175
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- .line 176
- invoke-virtual {v0, p0}, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;->forEachWhile(Lio/reactivex/internal/util/AppendOnlyLinkedArrayList$NonThrowingPredicate;)V
- goto :goto_0
- :catchall_0
- move-exception v0
- .line 175
- :try_start_1
- monitor-exit p0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- goto :goto_2
- :goto_1
- throw v0
- :goto_2
- goto :goto_1
- .end method
- .method public getThrowable()Ljava/lang/Throwable;
- .locals 1
- .line 197
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->actual:Lio/reactivex/subjects/Subject;
- invoke-virtual {v0}, Lio/reactivex/subjects/Subject;->getThrowable()Ljava/lang/Throwable;
- move-result-object v0
- return-object v0
- .end method
- .method public hasComplete()Z
- .locals 1
- .line 202
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->actual:Lio/reactivex/subjects/Subject;
- invoke-virtual {v0}, Lio/reactivex/subjects/Subject;->hasComplete()Z
- move-result v0
- return v0
- .end method
- .method public hasObservers()Z
- .locals 1
- .line 187
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->actual:Lio/reactivex/subjects/Subject;
- invoke-virtual {v0}, Lio/reactivex/subjects/Subject;->hasObservers()Z
- move-result v0
- return v0
- .end method
- .method public hasThrowable()Z
- .locals 1
- .line 192
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->actual:Lio/reactivex/subjects/Subject;
- invoke-virtual {v0}, Lio/reactivex/subjects/Subject;->hasThrowable()Z
- move-result v0
- return v0
- .end method
- .method public onComplete()V
- .locals 2
- .line 142
- iget-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->done:Z
- if-eqz v0, :cond_0
- return-void
- .line 145
- :cond_0
- monitor-enter p0
- .line 146
- :try_start_0
- iget-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->done:Z
- if-eqz v0, :cond_1
- .line 147
- monitor-exit p0
- return-void
- :cond_1
- const/4 v0, 0x1
- .line 149
- iput-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->done:Z
- .line 150
- iget-boolean v1, p0, Lio/reactivex/subjects/SerializedSubject;->emitting:Z
- if-eqz v1, :cond_3
- .line 151
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->queue:Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- if-nez v0, :cond_2
- .line 153
- new-instance v0, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- const/4 v1, 0x4
- invoke-direct {v0, v1}, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;-><init>(I)V
- .line 154
- iput-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->queue:Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- .line 156
- :cond_2
- invoke-static {}, Lio/reactivex/internal/util/NotificationLite;->complete()Ljava/lang/Object;
- move-result-object v1
- invoke-virtual {v0, v1}, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;->add(Ljava/lang/Object;)V
- .line 157
- monitor-exit p0
- return-void
- .line 159
- :cond_3
- iput-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->emitting:Z
- .line 160
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- .line 161
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->actual:Lio/reactivex/subjects/Subject;
- invoke-virtual {v0}, Lio/reactivex/subjects/Subject;->onComplete()V
- return-void
- :catchall_0
- move-exception v0
- .line 160
- :try_start_1
- monitor-exit p0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw v0
- .end method
- .method public onError(Ljava/lang/Throwable;)V
- .locals 2
- .line 110
- iget-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->done:Z
- if-eqz v0, :cond_0
- .line 111
- invoke-static {p1}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
- return-void
- .line 115
- :cond_0
- monitor-enter p0
- .line 116
- :try_start_0
- iget-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->done:Z
- const/4 v1, 0x1
- if-eqz v0, :cond_1
- const/4 v0, 0x1
- goto :goto_0
- .line 119
- :cond_1
- iput-boolean v1, p0, Lio/reactivex/subjects/SerializedSubject;->done:Z
- .line 120
- iget-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->emitting:Z
- if-eqz v0, :cond_3
- .line 121
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->queue:Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- if-nez v0, :cond_2
- .line 123
- new-instance v0, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- const/4 v1, 0x4
- invoke-direct {v0, v1}, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;-><init>(I)V
- .line 124
- iput-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->queue:Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- .line 126
- :cond_2
- invoke-static {p1}, Lio/reactivex/internal/util/NotificationLite;->error(Ljava/lang/Throwable;)Ljava/lang/Object;
- move-result-object p1
- invoke-virtual {v0, p1}, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;->setFirst(Ljava/lang/Object;)V
- .line 127
- monitor-exit p0
- return-void
- :cond_3
- const/4 v0, 0x0
- .line 130
- iput-boolean v1, p0, Lio/reactivex/subjects/SerializedSubject;->emitting:Z
- .line 132
- :goto_0
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- if-eqz v0, :cond_4
- .line 134
- invoke-static {p1}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
- return-void
- .line 137
- :cond_4
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->actual:Lio/reactivex/subjects/Subject;
- invoke-virtual {v0, p1}, Lio/reactivex/subjects/Subject;->onError(Ljava/lang/Throwable;)V
- return-void
- :catchall_0
- move-exception p1
- .line 132
- :try_start_1
- monitor-exit p0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw p1
- .end method
- .method public onNext(Ljava/lang/Object;)V
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(TT;)V"
- }
- .end annotation
- .line 86
- iget-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->done:Z
- if-eqz v0, :cond_0
- return-void
- .line 89
- :cond_0
- monitor-enter p0
- .line 90
- :try_start_0
- iget-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->done:Z
- if-eqz v0, :cond_1
- .line 91
- monitor-exit p0
- return-void
- .line 93
- :cond_1
- iget-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->emitting:Z
- if-eqz v0, :cond_3
- .line 94
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->queue:Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- if-nez v0, :cond_2
- .line 96
- new-instance v0, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- const/4 v1, 0x4
- invoke-direct {v0, v1}, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;-><init>(I)V
- .line 97
- iput-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->queue:Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- .line 99
- :cond_2
- invoke-static {p1}, Lio/reactivex/internal/util/NotificationLite;->next(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object p1
- invoke-virtual {v0, p1}, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;->add(Ljava/lang/Object;)V
- .line 100
- monitor-exit p0
- return-void
- :cond_3
- const/4 v0, 0x1
- .line 102
- iput-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->emitting:Z
- .line 103
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- .line 104
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->actual:Lio/reactivex/subjects/Subject;
- invoke-virtual {v0, p1}, Lio/reactivex/subjects/Subject;->onNext(Ljava/lang/Object;)V
- .line 105
- invoke-virtual {p0}, Lio/reactivex/subjects/SerializedSubject;->emitLoop()V
- return-void
- :catchall_0
- move-exception p1
- .line 103
- :try_start_1
- monitor-exit p0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw p1
- .end method
- .method public onSubscribe(Lio/reactivex/disposables/Disposable;)V
- .locals 2
- .line 55
- iget-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->done:Z
- const/4 v1, 0x1
- if-nez v0, :cond_3
- .line 56
- monitor-enter p0
- .line 57
- :try_start_0
- iget-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->done:Z
- if-eqz v0, :cond_0
- goto :goto_0
- .line 60
- :cond_0
- iget-boolean v0, p0, Lio/reactivex/subjects/SerializedSubject;->emitting:Z
- if-eqz v0, :cond_2
- .line 61
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->queue:Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- if-nez v0, :cond_1
- .line 63
- new-instance v0, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- const/4 v1, 0x4
- invoke-direct {v0, v1}, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;-><init>(I)V
- .line 64
- iput-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->queue:Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;
- .line 66
- :cond_1
- invoke-static {p1}, Lio/reactivex/internal/util/NotificationLite;->disposable(Lio/reactivex/disposables/Disposable;)Ljava/lang/Object;
- move-result-object p1
- invoke-virtual {v0, p1}, Lio/reactivex/internal/util/AppendOnlyLinkedArrayList;->add(Ljava/lang/Object;)V
- .line 67
- monitor-exit p0
- return-void
- .line 69
- :cond_2
- iput-boolean v1, p0, Lio/reactivex/subjects/SerializedSubject;->emitting:Z
- const/4 v0, 0x0
- const/4 v1, 0x0
- .line 72
- :goto_0
- monitor-exit p0
- goto :goto_1
- :catchall_0
- move-exception p1
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- throw p1
- :cond_3
- :goto_1
- if-eqz v1, :cond_4
- .line 77
- invoke-interface {p1}, Lio/reactivex/disposables/Disposable;->dispose()V
- goto :goto_2
- .line 79
- :cond_4
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->actual:Lio/reactivex/subjects/Subject;
- invoke-virtual {v0, p1}, Lio/reactivex/subjects/Subject;->onSubscribe(Lio/reactivex/disposables/Disposable;)V
- .line 80
- invoke-virtual {p0}, Lio/reactivex/subjects/SerializedSubject;->emitLoop()V
- :goto_2
- return-void
- .end method
- .method protected subscribeActual(Lio/reactivex/Observer;)V
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lio/reactivex/Observer<",
- "-TT;>;)V"
- }
- .end annotation
- .line 48
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->actual:Lio/reactivex/subjects/Subject;
- invoke-virtual {v0, p1}, Lio/reactivex/subjects/Subject;->subscribe(Lio/reactivex/Observer;)V
- return-void
- .end method
- .method public test(Ljava/lang/Object;)Z
- .locals 1
- .line 182
- iget-object v0, p0, Lio/reactivex/subjects/SerializedSubject;->actual:Lio/reactivex/subjects/Subject;
- invoke-static {p1, v0}, Lio/reactivex/internal/util/NotificationLite;->acceptFull(Ljava/lang/Object;Lio/reactivex/Observer;)Z
- move-result p1
- return p1
- .end method
|