This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is our FavouriteArticleUseCase: | |
public final class FavouriteArticleUseCase implements CompletableUseCase<Integer> { | |
private final FeedRepository feedRepository; | |
public FavouriteArticleUseCase(final FeedRepository feedRepository) { | |
this.feedRepository = feedRepository; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) throws InterruptedException { | |
Observable.zip(stringObservable().subscribeOn(Schedulers.io()), | |
integerObservable().subscribeOn(Schedulers.io()), | |
(s, integer) -> { | |
timedLog("Got items, zipping"); | |
return s + " " + String.valueOf(integer); | |
}) | |
.subscribeOn(Schedulers.io()) | |
.observeOn(Schedulers.computation()) |