public class GetRecordsResult
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Represents the output for GetRecords.
Modifier and Type | Field and Description |
---|---|
private java.lang.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.
|
private java.lang.String |
nextShardIterator
The next position in the shard from which to start sequentially reading
data records.
|
private SdkInternalList<Record> |
records
The data records retrieved from the shard.
|
Constructor and Description |
---|
GetRecordsResult() |
Modifier and Type | Method and Description |
---|---|
GetRecordsResult |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Long |
getMillisBehindLatest()
The number of milliseconds the GetRecords response is from the tip
of the stream, indicating how far behind current time the consumer is.
|
java.lang.String |
getNextShardIterator()
The next position in the shard from which to start sequentially reading
data records.
|
java.util.List<Record> |
getRecords()
The data records retrieved from the shard.
|
int |
hashCode() |
void |
setMillisBehindLatest(java.lang.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(java.lang.String nextShardIterator)
The next position in the shard from which to start sequentially reading
data records.
|
void |
setRecords(java.util.Collection<Record> records)
The data records retrieved from the shard.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
GetRecordsResult |
withMillisBehindLatest(java.lang.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.
|
GetRecordsResult |
withNextShardIterator(java.lang.String nextShardIterator)
The next position in the shard from which to start sequentially reading
data records.
|
GetRecordsResult |
withRecords(java.util.Collection<Record> records)
The data records retrieved from the shard.
|
GetRecordsResult |
withRecords(Record... records)
The data records retrieved from the shard.
|
private SdkInternalList<Record> records
The data records retrieved from the shard.
private java.lang.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 will not return any more data.
private java.lang.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 record processing is caught up, and there are no new records to process at this moment.
public java.util.List<Record> getRecords()
The data records retrieved from the shard.
public void setRecords(java.util.Collection<Record> records)
The data records retrieved from the shard.
records
- The data records retrieved from the shard.public GetRecordsResult withRecords(Record... records)
The data records retrieved from the shard.
NOTE: This method appends the values to the existing list (if
any). Use setRecords(java.util.Collection)
or
withRecords(java.util.Collection)
if you want to override the
existing values.
records
- The data records retrieved from the shard.public GetRecordsResult withRecords(java.util.Collection<Record> records)
The data records retrieved from the shard.
records
- The data records retrieved from the shard.public void setNextShardIterator(java.lang.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 will not return any more data.
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 will not return any more
data.public java.lang.String 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.
null
, the shard has
been closed and the requested iterator will not return any more
data.public GetRecordsResult withNextShardIterator(java.lang.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 will not return any more data.
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 will not return any more
data.public void setMillisBehindLatest(java.lang.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 record processing is caught up, and there are no new records to process at this moment.
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.public java.lang.Long 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.
public GetRecordsResult withMillisBehindLatest(java.lang.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 record processing is caught up, and there are no new records to process at this moment.
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.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public GetRecordsResult clone()
clone
in class java.lang.Object