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.Object
Builder class for constructingStreamOptions
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamOptions
build()
Builds a newStreamOptions
instance with the configured parameters.StreamOptions.Builder
cursor(java.lang.String cursor)
Sets the cursor for the stream.StreamOptions.Builder
retryStrategy(RetryStrategy retryStrategy)
Sets the retry strategy for the stream.StreamOptions.Builder
startTimestamp(long startTimestamp)
Sets the start timestamp for the stream.StreamOptions.Builder
statusEvents(java.lang.Boolean statusEvents)
Enables or disables status events for the stream.StreamOptions.Builder
timeout(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
- AString
representing the cursor position.- Returns:
- This
Builder
instance.
-
retryStrategy
public StreamOptions.Builder retryStrategy(RetryStrategy retryStrategy)
Sets the retry strategy for the stream.- Parameters:
retryStrategy
- TheRetryStrategy
for managing retries.- Returns:
- This
Builder
instance.
-
startTimestamp
public StreamOptions.Builder startTimestamp(long startTimestamp)
Sets the start timestamp for the stream.- Parameters:
startTimestamp
- Along
representing the start timestamp.- Returns:
- This
Builder
instance.
-
statusEvents
public StreamOptions.Builder statusEvents(java.lang.Boolean statusEvents)
Enables or disables status events for the stream.- Parameters:
statusEvents
- ABoolean
indicating if status events are enabled.- Returns:
- This
Builder
instance.
-
timeout
public StreamOptions.Builder timeout(java.time.Duration timeout)
Sets the timeout duration for the stream.- Parameters:
timeout
- ADuration
representing the timeout.- Returns:
- This
Builder
instance.
-
build
public StreamOptions build()
Builds a newStreamOptions
instance with the configured parameters.- Returns:
- A new
StreamOptions
instance.
-
-