Package com.fauna.event
Class StreamOptions.Builder
- java.lang.Object
-
- com.fauna.event.StreamOptions.Builder
-
- Enclosing class:
- StreamOptions
public static class StreamOptions.Builder extends java.lang.ObjectBuilder class for constructingStreamOptionsinstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamOptionsbuild()Builds a newStreamOptionsinstance with the configured parameters.StreamOptions.Buildercursor(java.lang.String cursor)Sets the cursor for the stream.StreamOptions.BuilderretryStrategy(RetryStrategy retryStrategy)Sets the retry strategy for the stream.StreamOptions.BuilderstartTimestamp(long startTimestamp)Sets the start timestamp for the stream.StreamOptions.BuilderstatusEvents(java.lang.Boolean statusEvents)Enables or disables status events for the stream.StreamOptions.Buildertimeout(java.time.Duration timeout)Sets the timeout duration for the stream.
-
-
-
Method Detail
-
cursor
public StreamOptions.Builder cursor(java.lang.String cursor)
Sets the cursor for the stream.- Parameters:
cursor- AStringrepresenting the cursor position.- Returns:
- This
Builderinstance.
-
retryStrategy
public StreamOptions.Builder retryStrategy(RetryStrategy retryStrategy)
Sets the retry strategy for the stream.- Parameters:
retryStrategy- TheRetryStrategyfor managing retries.- Returns:
- This
Builderinstance.
-
startTimestamp
public StreamOptions.Builder startTimestamp(long startTimestamp)
Sets the start timestamp for the stream.- Parameters:
startTimestamp- Alongrepresenting the start timestamp.- Returns:
- This
Builderinstance.
-
statusEvents
public StreamOptions.Builder statusEvents(java.lang.Boolean statusEvents)
Enables or disables status events for the stream.- Parameters:
statusEvents- ABooleanindicating if status events are enabled.- Returns:
- This
Builderinstance.
-
timeout
public StreamOptions.Builder timeout(java.time.Duration timeout)
Sets the timeout duration for the stream.- Parameters:
timeout- ADurationrepresenting the timeout.- Returns:
- This
Builderinstance.
-
build
public StreamOptions build()
Builds a newStreamOptionsinstance with the configured parameters.- Returns:
- A new
StreamOptionsinstance.
-
-