Open pluttrell opened 7 years ago
I'm a bit unsure about what you try achieve here:
If the third element is read via the iterator or via List.get(int)
, the element is transparently loaded with a new request.
I guess you try to load at max 2 items - like a SQL TOP 2
?
To be a bit more specific: AWS SDK will always load the whole list (in a lazy fashion) if asked about all elements (.size()
etc.).
Iterating over the list will fetch as many elements as requested via a provided Pageable
as soon as #117 is merged :-)
Based on this answer, it sounds like limiting the results returned to a specific number should be working. However the following example does not appear to work as I'm getting back many more results.
For this example
Repository
:Is this a bug or is there something else that I need to do to get limits working?