Class GetRecordsResult
- All Implemented Interfaces:
Serializable
,Cloneable
Represents the output for GetRecords.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The number of milliseconds the GetRecords response is from the tip of the stream, indicating how far behind current time the consumer is.The next position in the shard from which to start sequentially reading data records.The data records retrieved from the shard.int
hashCode()
void
setMillisBehindLatest
(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.void
setNextShardIterator
(String nextShardIterator) The next position in the shard from which to start sequentially reading data records.void
setRecords
(Collection<Record> records) The data records retrieved from the shard.toString()
Returns a string representation of this object; useful for testing and debugging.withMillisBehindLatest
(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.withNextShardIterator
(String nextShardIterator) The next position in the shard from which to start sequentially reading data records.withRecords
(Record... records) The data records retrieved from the shard.withRecords
(Collection<Record> records) The data records retrieved from the shard.
-
Constructor Details
-
GetRecordsResult
public GetRecordsResult()
-
-
Method Details
-
getRecords
The data records retrieved from the shard.
- Returns:
- The data records retrieved from the shard.
-
setRecords
The data records retrieved from the shard.
- Parameters:
records
- The data records retrieved from the shard.
-
withRecords
The data records retrieved from the shard.
NOTE: This method appends the values to the existing list (if any). Use
setRecords(java.util.Collection)
orwithRecords(java.util.Collection)
if you want to override the existing values.- Parameters:
records
- The data records retrieved from the shard.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withRecords
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.
-
setNextShardIterator
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 will not return any more data.- Parameters:
nextShardIterator
- The next position in the shard from which to start sequentially reading data records. If set tonull
, the shard has been closed and the requested iterator will not return any more data.
-
getNextShardIterator
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 will not return any more data.- Returns:
- 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 will not return any more data.
-
withNextShardIterator
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 will not return any more data.- Parameters:
nextShardIterator
- The next position in the shard from which to start sequentially reading data records. If set tonull
, 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.
-
setMillisBehindLatest
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 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 record processing is caught up, and there are no new records to process at this moment.
-
getMillisBehindLatest
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 record processing is caught up, and there are no new records to process at this moment.
- Returns:
- 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 record processing is caught up, and there are no new records to process at this moment.
-
withMillisBehindLatest
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 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 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.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-