Class Page<T,R>
- java.lang.Object
-
- com.amazonaws.services.dynamodbv2.document.Page<T,R>
-
- Type Parameters:
T
- item typeR
- low level result type
- All Implemented Interfaces:
Iterable<T>
public abstract class Page<T,R> extends Object implements Iterable<T>
A page contains a list of items; accessing methods on the list are guaranteed to be purely in-memory operations that will not block or throw exceptions because of transient network issues. A page also knows whether it has a "next page", and if so knows how to retrieve it (which will almost certainly involve a remote network call that may block or fail).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description R
getLowLevelResult()
abstract boolean
hasNextPage()
Checks whether this page has a "next page."Iterator<T>
iterator()
abstract Page<T,R>
nextPage()
Retrieves the next page.int
size()
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
hasNextPage
public abstract boolean hasNextPage()
Checks whether this page has a "next page." If this method returns true, the next page can be retrieved by callingnext
. If it returns false, any call tonext
will be guaranteed to throw anIllegalStateException
.- Returns:
- true if there is next page; false otherwise
-
nextPage
public abstract Page<T,R> nextPage()
Retrieves the next page.- Returns:
- the next page
- Throws:
NoSuchElementException
- if there is no next pageAmazonServiceException
- on error making the remote call
-
size
public final int size()
-
getLowLevelResult
public final R getLowLevelResult()
-
-