ScalarSubscription.smali
5.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
.class public final Lio/reactivex/internal/subscriptions/ScalarSubscription;
.super Ljava/util/concurrent/atomic/AtomicInteger;
.source "ScalarSubscription.java"
# interfaces
.implements Lio/reactivex/internal/fuseable/QueueSubscription;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/atomic/AtomicInteger;",
"Lio/reactivex/internal/fuseable/QueueSubscription<",
"TT;>;"
}
.end annotation
# static fields
.field static final CANCELLED:I = 0x2
.field static final NO_REQUEST:I = 0x0
.field static final REQUESTED:I = 0x1
.field private static final serialVersionUID:J = -0x352a2655229aa299L
# instance fields
.field final subscriber:Lorg/reactivestreams/Subscriber;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lorg/reactivestreams/Subscriber<",
"-TT;>;"
}
.end annotation
.end field
.field final value:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lorg/reactivestreams/Subscriber;Ljava/lang/Object;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lorg/reactivestreams/Subscriber<",
"-TT;>;TT;)V"
}
.end annotation
.line 42
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>()V
.line 43
iput-object p1, p0, Lio/reactivex/internal/subscriptions/ScalarSubscription;->subscriber:Lorg/reactivestreams/Subscriber;
.line 44
iput-object p2, p0, Lio/reactivex/internal/subscriptions/ScalarSubscription;->value:Ljava/lang/Object;
return-void
.end method
# virtual methods
.method public cancel()V
.locals 1
const/4 v0, 0x2
.line 65
invoke-virtual {p0, v0}, Lio/reactivex/internal/subscriptions/ScalarSubscription;->lazySet(I)V
return-void
.end method
.method public clear()V
.locals 1
const/4 v0, 0x1
.line 103
invoke-virtual {p0, v0}, Lio/reactivex/internal/subscriptions/ScalarSubscription;->lazySet(I)V
return-void
.end method
.method public isCancelled()Z
.locals 2
.line 73
invoke-virtual {p0}, Lio/reactivex/internal/subscriptions/ScalarSubscription;->get()I
move-result v0
const/4 v1, 0x2
if-ne v0, v1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public isEmpty()Z
.locals 1
.line 98
invoke-virtual {p0}, Lio/reactivex/internal/subscriptions/ScalarSubscription;->get()I
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public offer(Ljava/lang/Object;)Z
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)Z"
}
.end annotation
.line 78
new-instance p1, Ljava/lang/UnsupportedOperationException;
const-string v0, "Should not be called!"
invoke-direct {p1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public offer(Ljava/lang/Object;Ljava/lang/Object;)Z
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;TT;)Z"
}
.end annotation
.line 83
new-instance p1, Ljava/lang/UnsupportedOperationException;
const-string p2, "Should not be called!"
invoke-direct {p1, p2}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public poll()Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation build Lio/reactivex/annotations/Nullable;
.end annotation
.line 89
invoke-virtual {p0}, Lio/reactivex/internal/subscriptions/ScalarSubscription;->get()I
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
.line 90
invoke-virtual {p0, v0}, Lio/reactivex/internal/subscriptions/ScalarSubscription;->lazySet(I)V
.line 91
iget-object v0, p0, Lio/reactivex/internal/subscriptions/ScalarSubscription;->value:Ljava/lang/Object;
return-object v0
:cond_0
const/4 v0, 0x0
return-object v0
.end method
.method public request(J)V
.locals 1
.line 49
invoke-static {p1, p2}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(J)Z
move-result p1
if-nez p1, :cond_0
return-void
:cond_0
const/4 p1, 0x0
const/4 p2, 0x1
.line 52
invoke-virtual {p0, p1, p2}, Lio/reactivex/internal/subscriptions/ScalarSubscription;->compareAndSet(II)Z
move-result p1
if-eqz p1, :cond_1
.line 53
iget-object p1, p0, Lio/reactivex/internal/subscriptions/ScalarSubscription;->subscriber:Lorg/reactivestreams/Subscriber;
.line 55
iget-object p2, p0, Lio/reactivex/internal/subscriptions/ScalarSubscription;->value:Ljava/lang/Object;
invoke-interface {p1, p2}, Lorg/reactivestreams/Subscriber;->onNext(Ljava/lang/Object;)V
.line 56
invoke-virtual {p0}, Lio/reactivex/internal/subscriptions/ScalarSubscription;->get()I
move-result p2
const/4 v0, 0x2
if-eq p2, v0, :cond_1
.line 57
invoke-interface {p1}, Lorg/reactivestreams/Subscriber;->onComplete()V
:cond_1
return-void
.end method
.method public requestFusion(I)I
.locals 0
and-int/lit8 p1, p1, 0x1
return p1
.end method