Record Class Paging

java.lang.Object
java.lang.Record
codes.grow.packages.skywalking.Paging
Record Components:
pageNum - page number (1-based, default 1)
pageSize - page size (1..10000, default 20)

public record Paging(int pageNum, int pageSize) extends Record
1-based page selection of native trace and log queries. OAP returns no total and no cursor: a page that comes back full may have a successor.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Paging
    First page of 20.
    static final int
    Default page size.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Paging(int pageNum, int pageSize)
    Creates an instance of a Paging record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    static Paging
    of(int pageNum, int pageSize)
    Page pageNum of pageSize.
    int
    Returns the value of the pageNum record component.
    int
    Returns the value of the pageSize record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_PAGE_SIZE

      public static final int DEFAULT_PAGE_SIZE
      Default page size.
      See Also:
    • DEFAULT

      public static final Paging DEFAULT
      First page of 20.
  • Constructor Details

    • Paging

      public Paging(int pageNum, int pageSize)
      Creates an instance of a Paging record class.
      Parameters:
      pageNum - the value for the pageNum record component
      pageSize - the value for the pageSize record component
  • Method Details

    • of

      public static Paging of(int pageNum, int pageSize)
      Page pageNum of pageSize.
      Parameters:
      pageNum - page number
      pageSize - page size
      Returns:
      the paging
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • pageNum

      public int pageNum()
      Returns the value of the pageNum record component.
      Returns:
      the value of the pageNum record component
    • pageSize

      public int pageSize()
      Returns the value of the pageSize record component.
      Returns:
      the value of the pageSize record component