Interface GetRecordsResponse.Builder

    • Method Detail

      • records

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

        The data records retrieved from the shard.

        Parameters:
        records - The data records retrieved from the shard.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • records

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

        The data records retrieved from the shard.

        Parameters:
        records - The data records retrieved from the shard.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • nextShardIterator

        GetRecordsResponse.Builder nextShardIterator​(String nextShardIterator)

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

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

        GetRecordsResponse.Builder millisBehindLatest​(Long millisBehindLatest)

        The number of milliseconds the GetRecords response is from the tip of the stream, indicating how far behind current time the consumer is. A value of zero indicates that record processing is caught up, and there are no new records to process at this moment.

        Parameters:
        millisBehindLatest - The number of milliseconds the GetRecords response is from the tip of the stream, indicating how far behind current time the consumer is. A value of zero indicates that record processing is caught up, and there are no new records to process at this moment.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • childShards

        GetRecordsResponse.Builder childShards​(Collection<ChildShard> childShards)

        The list of the current shard's child shards, returned in the GetRecords API's response only when the end of the current shard is reached.

        Parameters:
        childShards - The list of the current shard's child shards, returned in the GetRecords API's response only when the end of the current shard is reached.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • childShards

        GetRecordsResponse.Builder childShards​(ChildShard... childShards)

        The list of the current shard's child shards, returned in the GetRecords API's response only when the end of the current shard is reached.

        Parameters:
        childShards - The list of the current shard's child shards, returned in the GetRecords API's response only when the end of the current shard is reached.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • childShards

        GetRecordsResponse.Builder childShards​(Consumer<ChildShard.Builder>... childShards)

        The list of the current shard's child shards, returned in the GetRecords API's response only when the end of the current shard is reached.

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

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

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