How to know PagingState has reached last Page?

Viewed 73

I am using PagingState to manage pagination from my Cassandra database. Currently when I reach the last page and hit the API again I get to the first page. How do I know that I have reached the last page or any way to stop the rotate?

1 Answers

After executing the query if the object of PagingState obtained from ResultSet is null then it means that there are no pages available anymore.

Related