Reputation: 3502
I am getting a List<> of objects from network. I want to pass all the objects to a function and get a result when all the list is exhausted.
Here is what I am doing right now.
Observable.fromIterable(shortLinksList)
.filter(shortLinkAlreadyExistsPredicate)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::insertLink);
How can I get notified when all the list is exhausted?
Upvotes: 0
Views: 4090