public class GetRecordsResult
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Represents the output of a GetRecords operation.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
nextShardIterator
The next position in the shard from which to start sequentially reading
stream records.
|
private java.util.List<Record> |
records
The stream records from the shard, which were retrieved using the shard
iterator.
|
Constructor and Description |
---|
GetRecordsResult() |
Modifier and Type | Method and Description |
---|---|
GetRecordsResult |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getNextShardIterator()
The next position in the shard from which to start sequentially reading
stream records.
|
java.util.List<Record> |
getRecords()
The stream records from the shard, which were retrieved using the shard
iterator.
|
int |
hashCode() |
void |
setNextShardIterator(java.lang.String nextShardIterator)
The next position in the shard from which to start sequentially reading
stream records.
|
void |
setRecords(java.util.Collection<Record> records)
The stream records from the shard, which were retrieved using the shard
iterator.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
GetRecordsResult |
withNextShardIterator(java.lang.String nextShardIterator)
The next position in the shard from which to start sequentially reading
stream records.
|
GetRecordsResult |
withRecords(java.util.Collection<Record> records)
The stream records from the shard, which were retrieved using the shard
iterator.
|
GetRecordsResult |
withRecords(Record... records)
The stream records from the shard, which were retrieved using the shard
iterator.
|
private java.util.List<Record> records
The stream records from the shard, which were retrieved using the shard iterator.
private java.lang.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.
public java.util.List<Record> getRecords()
The stream records from the shard, which were retrieved using the shard iterator.
public void setRecords(java.util.Collection<Record> records)
The stream records from the shard, which were retrieved using the shard iterator.
records
- The stream records from the shard, which were retrieved using the
shard iterator.public GetRecordsResult withRecords(Record... records)
The stream records from the shard, which were retrieved using the shard iterator.
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 stream records from the shard, which were retrieved using the
shard iterator.public GetRecordsResult withRecords(java.util.Collection<Record> records)
The stream records from the shard, which were retrieved using the shard iterator.
records
- The stream records from the shard, which were retrieved using the
shard iterator.public void setNextShardIterator(java.lang.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.
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.public java.lang.String getNextShardIterator()
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.
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
stream 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 stream records. If set to null
, the shard has
been closed and the requested iterator will not return any more
data.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