51
51
* Finally the actions scheduled on the parent {@link Scheduler} when the inner
52
52
* most {@link Completable}s are subscribed to.
53
53
* <p>
54
- * When the {@link Worker} is unsubscribed the {@link Completable} emits an
54
+ * When the {@link io.reactivex.Scheduler.Worker Worker} is unsubscribed the {@link Completable} emits an
55
55
* onComplete and triggers any behavior in the flattening operator. The
56
56
* {@link Observable} and all {@link Completable}s give to the flattening
57
57
* function never onError.
69
69
* <p>
70
70
* This is a slightly different way to limit the concurrency but it has some
71
71
* interesting benefits and drawbacks to the method above. It works by limited
72
- * the number of concurrent {@link Worker}s rather than individual actions.
73
- * Generally each {@link Observable} uses its own {@link Worker}. This means
72
+ * the number of concurrent {@link io.reactivex.Scheduler.Worker Worker}s rather than individual actions.
73
+ * Generally each {@link Observable} uses its own {@link io.reactivex.Scheduler.Worker Worker}. This means
74
74
* that this will essentially limit the number of concurrent subscribes. The
75
75
* danger comes from using operators like
76
- * {@link Observable #zip(Observable, Observable, rx. functions.Func2 )} where
76
+ * {@link Flowable #zip(org.reactivestreams.Publisher, org.reactivestreams.Publisher, io.reactivex. functions.BiFunction )} where
77
77
* subscribing to the first {@link Observable} could deadlock the subscription
78
78
* to the second.
79
79
*
99
99
* }));
100
100
* });
101
101
* </pre>
102
- *
103
- * @param combine
104
- * @return
105
102
*/
106
103
@ Experimental
107
104
public class SchedulerWhen extends Scheduler implements Disposable {
@@ -209,12 +206,12 @@ public boolean isDisposed() {
209
206
static final Disposable DISPOSED = Disposables .disposed ();
210
207
211
208
@ SuppressWarnings ("serial" )
212
- static abstract class ScheduledAction extends AtomicReference <Disposable >implements Disposable {
213
- public ScheduledAction () {
209
+ abstract static class ScheduledAction extends AtomicReference <Disposable >implements Disposable {
210
+ ScheduledAction () {
214
211
super (SUBSCRIBED );
215
212
}
216
213
217
- private final void call (Worker actualWorker , CompletableObserver actionCompletable ) {
214
+ void call (Worker actualWorker , CompletableObserver actionCompletable ) {
218
215
Disposable oldState = get ();
219
216
// either SUBSCRIBED or UNSUBSCRIBED
220
217
if (oldState == DISPOSED ) {
@@ -270,7 +267,7 @@ public void dispose() {
270
267
static class ImmediateAction extends ScheduledAction {
271
268
private final Runnable action ;
272
269
273
- public ImmediateAction (Runnable action ) {
270
+ ImmediateAction (Runnable action ) {
274
271
this .action = action ;
275
272
}
276
273
@@ -286,7 +283,7 @@ static class DelayedAction extends ScheduledAction {
286
283
private final long delayTime ;
287
284
private final TimeUnit unit ;
288
285
289
- public DelayedAction (Runnable action , long delayTime , TimeUnit unit ) {
286
+ DelayedAction (Runnable action , long delayTime , TimeUnit unit ) {
290
287
this .action = action ;
291
288
this .delayTime = delayTime ;
292
289
this .unit = unit ;
@@ -302,7 +299,7 @@ static class OnCompletedAction implements Runnable {
302
299
private CompletableObserver actionCompletable ;
303
300
private Runnable action ;
304
301
305
- public OnCompletedAction (Runnable action , CompletableObserver actionCompletable ) {
302
+ OnCompletedAction (Runnable action , CompletableObserver actionCompletable ) {
306
303
this .action = action ;
307
304
this .actionCompletable = actionCompletable ;
308
305
}
0 commit comments