Package io.pravega.client.stream
Class ReaderGroupConfig.ReaderGroupConfigBuilder
- java.lang.Object
-
- io.pravega.client.stream.ReaderGroupConfig.ReaderGroupConfigBuilder
-
- All Implemented Interfaces:
io.pravega.common.ObjectBuilder<ReaderGroupConfig>
- Enclosing class:
- ReaderGroupConfig
public static class ReaderGroupConfig.ReaderGroupConfigBuilder extends java.lang.Object implements io.pravega.common.ObjectBuilder<ReaderGroupConfig>
-
-
Method Summary
-
-
-
Method Detail
-
disableAutomaticCheckpoints
public ReaderGroupConfig.ReaderGroupConfigBuilder disableAutomaticCheckpoints()
Disables automatic checkpointing. Checkpoints need to be generated manually, see this method:ReaderGroup.initiateCheckpoint(String, ScheduledExecutorService)
.- Returns:
- Reader group config builder.
-
stream
public ReaderGroupConfig.ReaderGroupConfigBuilder stream(java.lang.String scopedStreamName, StreamCut startStreamCut, StreamCut endStreamCut)
-
stream
public ReaderGroupConfig.ReaderGroupConfigBuilder stream(java.lang.String scopedStreamName, StreamCut startStreamCut)
Add a stream and its associated startStreamCut
to be read by the readers of a ReaderGroup.- Parameters:
scopedStreamName
- Scoped Name of the Stream.startStreamCut
- StartStreamCut
.- Returns:
- Reader group config builder.
-
stream
public ReaderGroupConfig.ReaderGroupConfigBuilder stream(java.lang.String scopedStreamName)
Add a stream that needs to be read by the readers of a ReaderGroup. The current starting position of the stream will be used as the starting StreamCut.- Parameters:
scopedStreamName
- Stream name.- Returns:
- Reader group config builder.
-
stream
public ReaderGroupConfig.ReaderGroupConfigBuilder stream(Stream stream, StreamCut startStreamCut, StreamCut endStreamCut)
-
stream
public ReaderGroupConfig.ReaderGroupConfigBuilder stream(Stream stream, StreamCut startStreamCut)
Add a stream and its associated startStreamCut
to be read by the readers of a ReaderGroup.- Parameters:
stream
- Stream.startStreamCut
- StartStreamCut
- Returns:
- Reader group config builder.
-
stream
public ReaderGroupConfig.ReaderGroupConfigBuilder stream(Stream stream)
Add a stream that needs to be read by the readers of a ReaderGroup. The current starting position of the stream will be used as the starting StreamCut.- Parameters:
stream
- Stream.- Returns:
- Reader group config builder.
-
startFromStreamCuts
public ReaderGroupConfig.ReaderGroupConfigBuilder startFromStreamCuts(java.util.Map<Stream,StreamCut> streamCuts)
Ensure the readers of the ReaderGroup start from this provided streamCuts.
-
startFromCheckpoint
public ReaderGroupConfig.ReaderGroupConfigBuilder startFromCheckpoint(Checkpoint checkpoint)
Ensure the readers of the ReaderGroup start from the providedCheckpoint
.- Parameters:
checkpoint
-Checkpoint
.- Returns:
- Reader group config builder.
-
retentionType
public ReaderGroupConfig.ReaderGroupConfigBuilder retentionType(ReaderGroupConfig.StreamDataRetention type)
Set the retention config for theReaderGroup
. For Consumption based retention of data in the Stream, this field should be set to MANUAL_RELEASE_AT_USER_STREAMCUT or AUTOMATIC_RELEASE_AT_LAST_CHECKPOINT. See:ReaderGroupConfig.StreamDataRetention
Default value: NONE.- Parameters:
type
- A type parameter that indicates if the reads of this ReaderGroup would impact retention of data in the Stream.ReaderGroupConfig.StreamDataRetention
.- Returns:
- Reader group config builder.
-
build
public ReaderGroupConfig build()
- Specified by:
build
in interfaceio.pravega.common.ObjectBuilder<ReaderGroupConfig>
-
groupRefreshTimeMillis
public ReaderGroupConfig.ReaderGroupConfigBuilder groupRefreshTimeMillis(long groupRefreshTimeMillis)
-
automaticCheckpointIntervalMillis
public ReaderGroupConfig.ReaderGroupConfigBuilder automaticCheckpointIntervalMillis(long automaticCheckpointIntervalMillis)
-
startingStreamCuts
public ReaderGroupConfig.ReaderGroupConfigBuilder startingStreamCuts(java.util.Map<Stream,StreamCut> startingStreamCuts)
-
endingStreamCuts
public ReaderGroupConfig.ReaderGroupConfigBuilder endingStreamCuts(java.util.Map<Stream,StreamCut> endingStreamCuts)
-
maxOutstandingCheckpointRequest
public ReaderGroupConfig.ReaderGroupConfigBuilder maxOutstandingCheckpointRequest(int maxOutstandingCheckpointRequest)
-
generation
public ReaderGroupConfig.ReaderGroupConfigBuilder generation(long generation)
-
readerGroupId
public ReaderGroupConfig.ReaderGroupConfigBuilder readerGroupId(java.util.UUID readerGroupId)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-