Class FeedOptions.Builder

  • Enclosing class:
    FeedOptions

    public static class FeedOptions.Builder
    extends java.lang.Object
    Builder class for constructing FeedOptions instances.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • cursor

        public FeedOptions.Builder cursor​(java.lang.String cursor)
        Sets the cursor.
        Parameters:
        cursor - A String representing the cursor.
        Returns:
        This Builder instance.
        Throws:
        java.lang.IllegalArgumentException - if startTs is already set.
      • startTs

        public FeedOptions.Builder startTs​(java.lang.Long startTs)
        Sets the start timestamp.
        Parameters:
        startTs - A Long representing the start timestamp.
        Returns:
        This Builder instance.
        Throws:
        java.lang.IllegalArgumentException - if cursor is already set.
      • pageSize

        public FeedOptions.Builder pageSize​(java.lang.Integer pageSize)
        Sets the page size.
        Parameters:
        pageSize - An Integer specifying the number of items per page.
        Returns:
        This Builder instance.
      • timeout

        public FeedOptions.Builder timeout​(java.time.Duration timeout)
        Sets the timeout duration.
        Parameters:
        timeout - A Duration specifying the timeout for the feed request.
        Returns:
        This Builder instance.
      • build

        public FeedOptions build()
        Builds a new FeedOptions instance with the configured parameters.
        Returns:
        A new FeedOptions instance.
        Throws:
        java.lang.IllegalArgumentException - if both cursor and startTs are set.