Interface StreamProxy
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
KinesisStreamProxy
@Internal public interface StreamProxy extends Closeable
Interface for a StreamProxy to interact with Streams service in a given region.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description software.amazon.awssdk.services.kinesis.model.GetRecordsResponsegetRecords(String streamArn, String shardId, StartingPosition startingPosition)Retrieves records from the stream.List<software.amazon.awssdk.services.kinesis.model.Shard>listShards(String streamArn, String lastSeenShardId)Obtains the shards associated with a given stream.
-
-
-
Method Detail
-
listShards
List<software.amazon.awssdk.services.kinesis.model.Shard> listShards(String streamArn, @Nullable String lastSeenShardId)
Obtains the shards associated with a given stream.- Parameters:
streamArn- the ARN of the streamlastSeenShardId- the last seen shard Id. Used for reducing the number of results returned.- Returns:
- shard list
-
getRecords
software.amazon.awssdk.services.kinesis.model.GetRecordsResponse getRecords(String streamArn, String shardId, StartingPosition startingPosition)
Retrieves records from the stream.- Parameters:
streamArn- the ARN of the streamshardId- the shard to subscribe fromstartingPosition- the starting position to read from- Returns:
- the response with records. Includes both the returned records and the subsequent shard iterator to use.
-
-