Package com.fauna.event
Class FeedOptions.Builder
- java.lang.Object
-
- com.fauna.event.FeedOptions.Builder
-
- Enclosing class:
- FeedOptions
public static class FeedOptions.Builder extends java.lang.ObjectBuilder class for constructingFeedOptionsinstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FeedOptionsbuild()Builds a newFeedOptionsinstance with the configured parameters.FeedOptions.Buildercursor(java.lang.String cursor)Sets the cursor.FeedOptions.BuilderpageSize(java.lang.Integer pageSize)Sets the page size.FeedOptions.BuilderstartTs(java.lang.Long startTs)Sets the start timestamp.FeedOptions.Buildertimeout(java.time.Duration timeout)Sets the timeout duration.
-
-
-
Method Detail
-
cursor
public FeedOptions.Builder cursor(java.lang.String cursor)
Sets the cursor.- Parameters:
cursor- AStringrepresenting the cursor.- Returns:
- This
Builderinstance. - Throws:
java.lang.IllegalArgumentException- ifstartTsis already set.
-
startTs
public FeedOptions.Builder startTs(java.lang.Long startTs)
Sets the start timestamp.- Parameters:
startTs- ALongrepresenting the start timestamp.- Returns:
- This
Builderinstance. - Throws:
java.lang.IllegalArgumentException- ifcursoris already set.
-
pageSize
public FeedOptions.Builder pageSize(java.lang.Integer pageSize)
Sets the page size.- Parameters:
pageSize- AnIntegerspecifying the number of items per page.- Returns:
- This
Builderinstance.
-
timeout
public FeedOptions.Builder timeout(java.time.Duration timeout)
Sets the timeout duration.- Parameters:
timeout- ADurationspecifying the timeout for the feed request.- Returns:
- This
Builderinstance.
-
build
public FeedOptions build()
Builds a newFeedOptionsinstance with the configured parameters.- Returns:
- A new
FeedOptionsinstance. - Throws:
java.lang.IllegalArgumentException- if bothcursorandstartTsare set.
-
-