Interface GetRecordsResponse.Builder

    • Method Detail

      • records

        GetRecordsResponse.Builder records​(Collection<Record> records)

        The stream records from the shard, which were retrieved using the shard iterator.

        Parameters:
        records - The stream records from the shard, which were retrieved using the shard iterator.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • records

        GetRecordsResponse.Builder records​(Record... records)

        The stream records from the shard, which were retrieved using the shard iterator.

        Parameters:
        records - The stream records from the shard, which were retrieved using the shard iterator.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • records

        GetRecordsResponse.Builder records​(Consumer<Record.Builder>... records)

        The stream records from the shard, which were retrieved using the shard iterator.

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

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #records(List).

        Parameters:
        records - a consumer that will call methods on Record.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #records(java.util.Collection)
      • nextShardIterator

        GetRecordsResponse.Builder nextShardIterator​(String nextShardIterator)

        The next position in the shard from which to start sequentially reading stream records. If set to null, the shard has been closed and the requested iterator will not return any more data.

        Parameters:
        nextShardIterator - The next position in the shard from which to start sequentially reading stream records. If set to null, the shard has been closed and the requested iterator will not return any more data.
        Returns:
        Returns a reference to this object so that method calls can be chained together.