Class Pagination
java.lang.Object
com.eqixiac.equinix.core.http.request.Pagination
Client-side pagination state serialized into POST-search request bodies and advanced by the
paging pipeline between page fetches. Fields are primitives so paging arithmetic can never
throw a null-unboxing
NullPointerException.-
Constructor Summary
ConstructorsConstructorDescriptionPagination(int offset, int limit) Creates pagination state for a POST-search body. -
Method Summary
Modifier and TypeMethodDescriptionvoidnextPage()voidRolls the offset back one page (floored at zero).
-
Constructor Details
-
Pagination
public Pagination(int offset, int limit) Creates pagination state for a POST-search body. The parameter order is pinned by this explicit constructor -offsetfirst, thenlimit- deliberately not Lombok-generated, so a field reorder can never silently transpose the twointarguments at call sites.- Parameters:
offset- the zero-based index of the first record of the requested pagelimit- the page size
-
-
Method Details
-
nextPage
public void nextPage() -
previousPage
public void previousPage()Rolls the offset back one page (floored at zero). Used by the paging pipeline to restore the pre-advance state when a page fetch fails, so a retriednext()re-requests the same page instead of silently skipping one.
-