Interface Shard.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Shard.Builder,Shard>, SdkBuilder<Shard.Builder,Shard>, SdkPojo
Enclosing class:
Shard

@Mutable @NotThreadSafe public static interface Shard.Builder extends SdkPojo, CopyableBuilder<Shard.Builder,Shard>
  • Method Details

    • shardId

      Shard.Builder shardId(String shardId)

      A unique identifier for this shard within the stream.

      Parameters:
      shardId - A unique identifier for this shard within the stream.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sequenceNumberRange

      Shard.Builder sequenceNumberRange(SequenceNumberRange sequenceNumberRange)

      The range of sequence numbers contained within this shard.

      Parameters:
      sequenceNumberRange - The range of sequence numbers contained within this shard.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sequenceNumberRange

      default Shard.Builder sequenceNumberRange(Consumer<SequenceNumberRange.Builder> sequenceNumberRange)

      The range of sequence numbers contained within this shard.

      This is a convenience method that creates an instance of the SequenceNumberRange.Builder avoiding the need to create one manually via SequenceNumberRange.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to sequenceNumberRange(SequenceNumberRange).

      Parameters:
      sequenceNumberRange - a consumer that will call methods on SequenceNumberRange.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • parentShardIds

      Shard.Builder parentShardIds(Collection<String> parentShardIds)

      The identifiers of parent shards that this shard evolved from, if this shard was created through resharding.

      Parameters:
      parentShardIds - The identifiers of parent shards that this shard evolved from, if this shard was created through resharding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • parentShardIds

      Shard.Builder parentShardIds(String... parentShardIds)

      The identifiers of parent shards that this shard evolved from, if this shard was created through resharding.

      Parameters:
      parentShardIds - The identifiers of parent shards that this shard evolved from, if this shard was created through resharding.
      Returns:
      Returns a reference to this object so that method calls can be chained together.