Class AbstractReaderBuilder<B extends AbstractReaderBuilder>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract B builder()  
      B enableMetrics​(boolean enable)
      enable/disable pravega reader metrics (default: enabled).
      B forStream​(io.pravega.client.stream.Stream stream)
      Add a stream to be read by the source, from the earliest available position in the stream.
      B forStream​(io.pravega.client.stream.Stream stream, io.pravega.client.stream.StreamCut startStreamCut)
      Add a stream to be read by the source, from the given start position in the stream.
      B forStream​(io.pravega.client.stream.Stream stream, io.pravega.client.stream.StreamCut startStreamCut, io.pravega.client.stream.StreamCut endStreamCut)
      Add a stream to be read by the source, from the given start position in the stream to the given end position.
      B forStream​(java.lang.String streamSpec)
      Add a stream to be read by the source, from the earliest available position in the stream.
      B forStream​(java.lang.String streamSpec, io.pravega.client.stream.StreamCut startStreamCut)
      Add a stream to be read by the source, from the given start position in the stream.
      B forStream​(java.lang.String streamSpec, io.pravega.client.stream.StreamCut startStreamCut, io.pravega.client.stream.StreamCut endStreamCut)
      Add a stream to be read by the source, from the given start position in the stream.
      protected PravegaConfig getPravegaConfig()
      Gets the Pravega configuration.
      protected boolean isMetricsEnabled()
      getter to fetch the metrics flag.
      protected java.util.List<StreamWithBoundaries> resolveStreams()
      Resolves the streams to be provided to the reader, based on the configured default scope.
      B withPravegaConfig​(PravegaConfig pravegaConfig)
      Set the Pravega client configuration, which includes connection info, security info, and a default scope.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractReaderBuilder

        protected AbstractReaderBuilder()
    • Method Detail

      • withPravegaConfig

        public B withPravegaConfig​(PravegaConfig pravegaConfig)
        Set the Pravega client configuration, which includes connection info, security info, and a default scope. The default client configuration is obtained from PravegaConfig.fromDefaults().
        Parameters:
        pravegaConfig - the configuration to use.
      • forStream

        public B forStream​(java.lang.String streamSpec,
                           io.pravega.client.stream.StreamCut startStreamCut)
        Add a stream to be read by the source, from the given start position in the stream.
        Parameters:
        streamSpec - the unqualified or qualified name of the stream.
        startStreamCut - Start StreamCut
        Returns:
        A builder to configure and create a reader.
      • forStream

        public B forStream​(java.lang.String streamSpec,
                           io.pravega.client.stream.StreamCut startStreamCut,
                           io.pravega.client.stream.StreamCut endStreamCut)
        Add a stream to be read by the source, from the given start position in the stream.
        Parameters:
        streamSpec - the unqualified or qualified name of the stream.
        startStreamCut - Start StreamCut
        endStreamCut - End StreamCut
        Returns:
        A builder to configure and create a reader.
      • forStream

        public B forStream​(java.lang.String streamSpec)
        Add a stream to be read by the source, from the earliest available position in the stream.
        Parameters:
        streamSpec - the unqualified or qualified name of the stream.
        Returns:
        A builder to configure and create a reader.
      • forStream

        public B forStream​(io.pravega.client.stream.Stream stream,
                           io.pravega.client.stream.StreamCut startStreamCut)
        Add a stream to be read by the source, from the given start position in the stream.
        Parameters:
        stream - Stream.
        startStreamCut - Start StreamCut
        Returns:
        A builder to configure and create a reader.
      • forStream

        public B forStream​(io.pravega.client.stream.Stream stream,
                           io.pravega.client.stream.StreamCut startStreamCut,
                           io.pravega.client.stream.StreamCut endStreamCut)
        Add a stream to be read by the source, from the given start position in the stream to the given end position.
        Parameters:
        stream - Stream.
        startStreamCut - Start StreamCut
        endStreamCut - End StreamCut
        Returns:
        A builder to configure and create a reader.
      • forStream

        public B forStream​(io.pravega.client.stream.Stream stream)
        Add a stream to be read by the source, from the earliest available position in the stream.
        Parameters:
        stream - Stream.
        Returns:
        A builder to configure and create a reader.
      • getPravegaConfig

        protected PravegaConfig getPravegaConfig()
        Gets the Pravega configuration.
      • resolveStreams

        protected java.util.List<StreamWithBoundaries> resolveStreams()
        Resolves the streams to be provided to the reader, based on the configured default scope.
      • enableMetrics

        public B enableMetrics​(boolean enable)
        enable/disable pravega reader metrics (default: enabled).
        Parameters:
        enable - boolean
        Returns:
        A builder to configure and create a reader.
      • isMetricsEnabled

        protected boolean isMetricsEnabled()
        getter to fetch the metrics flag.
      • builder

        protected abstract B builder()