Class Pagination

java.lang.Object
com.eqixiac.equinix.core.http.request.Pagination

public class Pagination extends Object
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 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 - offset first, then limit - deliberately not Lombok-generated, so a field reorder can never silently transpose the two int arguments at call sites.
      Parameters:
      offset - the zero-based index of the first record of the requested page
      limit - 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 retried next() re-requests the same page instead of silently skipping one.