#538 Adaptive Loading of Valid Accounts
There is service A and authorization service B.
The DataService class is used to obtain accounts from service B over REST.
It has three methods:
dataService.getCount()returns the number of accounts;dataService.getPersons(int from, int to)returns accounts from serviceBordered by index in the range fromfromtoto;dataService.getAllPersons()returns all accounts ordered by index.
These methods cannot be changed.
Some accounts are known to contain additional heavy data in Person.description.
Because of this, the gateway may block the response due to a response-body size limit.
Implement the fastest possible retrieval of all valid Person objects.
Question review
Sign in to start the dialogue
The mentor keeps the context of the current question and your previous messages.
Sign in
Available with Premium
This is just one of the solutions available with Premium. And more:
- 250+ advanced lectures
- 1300+ practice exercises
- 500+ solutions to problems from real interviews
- Personalized Java Hub certificates
- Expanded access to the AI mentor