Retriever
The Retriever
handles that repetitive retrieving routines and execute them in background by the retrieverScope
Author
N7ghtm4r3 - Tecknobit
Parameters
The coroutine used to execute the retrieving routines
Types
The RetrieverWrapper interface is useful for wrapping and facilitating operation with the Retriever, so the inheriting classes will invoke just the wrapper methods for a clean readability of the code, for example:
Properties
isRefreshing
whether the retrieverScope is already refreshing
Functions
Method used to get whether the retrieverScope can start, so if there aren't other jobs that routine is already executing
Method used to check if the retrieverScope can continue to refresh or need to be stopped, this for example when the UI displayed changes and the requests to refresh the UI data also changes
Method used to restart the current retrieverScope after other requests has been executed, the isRefreshing instance will be set as true to deny the restart of the routine after executing the other requests
Method used to suspend the current retrieverScope to execute other requests to the backend, the isRefreshing instance will be set as false to allow the restart of the routine after executing the other requests