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 2424import rx .Observable .Operator ;
2525import rx .Producer ;
2626import rx .Subscriber ;
27- import rx .functions .Func0 ;
27+ import rx .functions .Action0 ;
2828
2929public class OperatorOnBackpressureBuffer <T > implements Operator <T , T > {
3030
3131 private final NotificationLite <T > on = NotificationLite .instance ();
3232
3333 private final Long capacity ;
34- private final Func0 onOverflow ;
34+ private final Action0 onOverflow ;
3535
3636 public OperatorOnBackpressureBuffer () {
3737 this .capacity = null ;
@@ -42,7 +42,7 @@ public OperatorOnBackpressureBuffer(long capacity) {
4242 this (capacity , null );
4343 }
4444
45- public OperatorOnBackpressureBuffer (long capacity , Func0 < Void > onOverflow ) {
45+ public OperatorOnBackpressureBuffer (long capacity , Action0 onOverflow ) {
4646 if (capacity <= 0 ) {
4747 throw new IllegalArgumentException ("Buffer capacity must be > 0" );
4848 }
Original file line number Diff line number Diff line change 1515 */
1616package rx .internal .operators ;
1717
18+ import static org .junit .Assert .assertEquals ;
19+ import static org .junit .Assert .assertTrue ;
20+
1821import java .nio .BufferOverflowException ;
1922import java .util .concurrent .CountDownLatch ;
2023
2528import rx .Observer ;
2629import rx .Subscriber ;
2730import rx .Subscription ;
28- import rx .functions .Func0 ;
31+ import rx .functions .Action0 ;
2932import rx .observables .ConnectableObservable ;
3033import rx .observers .TestSubscriber ;
3134import rx .schedulers .Schedulers ;
3235
33- import static org .junit .Assert .assertEquals ;
34- import static org .junit .Assert .assertTrue ;
35-
3636public class OperatorOnBackpressureBufferTest {
3737
3838 @ Test
@@ -126,11 +126,10 @@ public void onNext(Long t) {
126126 .publish ();
127127 final ConnectableObservable <Long > batch =
128128 infinite .subscribeOn (Schedulers .computation ())
129- .onBackpressureBuffer (100 , new Func0 < Void > () {
129+ .onBackpressureBuffer (100 , new Action0 () {
130130 @ Override
131- public Void call () {
131+ public void call () {
132132 l3 .countDown ();
133- return null ;
134133 }
135134 }).publish ();
136135 Subscription s = batch .subscribe (ts );
You can’t perform that action at this time.
0 commit comments