Follow

I really love reactive and declarative syntax. This snippet of code does 7 things:

1. Downloads a page from a paging API
2. Serializes the body
3. Saves the link to the next page
4. Takes the body and creates a stream of multiple list items
5. Maps each of those items to database entities
6. Saves all of those to a database
7. Waits for everything to complete, all without blocking any threads, before handling the next page

Sign in to participate in the conversation
niu.moe

Welcome to your niu world ! We are a cute and loving international community O(≧▽≦)O !