Package io.hstream

Class Stream.Builder

  • Enclosing class:
    Stream

    public static final class Stream.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • streamName

        public Stream.Builder streamName​(String streamName)
        Parameters:
        streamName - required, the name of the stream
        Returns:
        Stream.Builder instance
      • replicationFactor

        public Stream.Builder replicationFactor​(int replicationFactor)
        Parameters:
        replicationFactor - optional(default: 1), replication factor of the stream
        Returns:
        Stream.Builder instance
      • backlogDuration

        public Stream.Builder backlogDuration​(int backlogDuration)
        Parameters:
        backlogDuration - optional(default: 3600 * 24), backlog duration(in seconds) of the stream
        Returns:
        Stream.Builder instance
      • shardCount

        public Stream.Builder shardCount​(int shardCount)
        Parameters:
        shardCount - optional(default: 1), number of shards in the stream
        Returns:
        Stream.Builder instance
      • build

        public Stream build()