File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
main/java/rx/internal/operators
test/java/rx/internal/operators Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 24
24
import rx .Observable .Operator ;
25
25
import rx .Producer ;
26
26
import rx .Subscriber ;
27
- import rx .functions .Func0 ;
27
+ import rx .functions .Action0 ;
28
28
29
29
public class OperatorOnBackpressureBuffer <T > implements Operator <T , T > {
30
30
31
31
private final NotificationLite <T > on = NotificationLite .instance ();
32
32
33
33
private final Long capacity ;
34
- private final Func0 onOverflow ;
34
+ private final Action0 onOverflow ;
35
35
36
36
public OperatorOnBackpressureBuffer () {
37
37
this .capacity = null ;
@@ -42,7 +42,7 @@ public OperatorOnBackpressureBuffer(long capacity) {
42
42
this (capacity , null );
43
43
}
44
44
45
- public OperatorOnBackpressureBuffer (long capacity , Func0 < Void > onOverflow ) {
45
+ public OperatorOnBackpressureBuffer (long capacity , Action0 onOverflow ) {
46
46
if (capacity <= 0 ) {
47
47
throw new IllegalArgumentException ("Buffer capacity must be > 0" );
48
48
}
Original file line number Diff line number Diff line change 15
15
*/
16
16
package rx .internal .operators ;
17
17
18
+ import static org .junit .Assert .assertEquals ;
19
+ import static org .junit .Assert .assertTrue ;
20
+
18
21
import java .nio .BufferOverflowException ;
19
22
import java .util .concurrent .CountDownLatch ;
20
23
25
28
import rx .Observer ;
26
29
import rx .Subscriber ;
27
30
import rx .Subscription ;
28
- import rx .functions .Func0 ;
31
+ import rx .functions .Action0 ;
29
32
import rx .observables .ConnectableObservable ;
30
33
import rx .observers .TestSubscriber ;
31
34
import rx .schedulers .Schedulers ;
32
35
33
- import static org .junit .Assert .assertEquals ;
34
- import static org .junit .Assert .assertTrue ;
35
-
36
36
public class OperatorOnBackpressureBufferTest {
37
37
38
38
@ Test
@@ -126,11 +126,10 @@ public void onNext(Long t) {
126
126
.publish ();
127
127
final ConnectableObservable <Long > batch =
128
128
infinite .subscribeOn (Schedulers .computation ())
129
- .onBackpressureBuffer (100 , new Func0 < Void > () {
129
+ .onBackpressureBuffer (100 , new Action0 () {
130
130
@ Override
131
- public Void call () {
131
+ public void call () {
132
132
l3 .countDown ();
133
- return null ;
134
133
}
135
134
}).publish ();
136
135
Subscription s = batch .subscribe (ts );
You can’t perform that action at this time.
0 commit comments