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.DeregisterStreamConsumerResponsederegisterStreamConsumer(String consumerArn)De-registers an enhanced fan-out consumer against the stream.software.amazon.awssdk.services.kinesis.model.DescribeStreamConsumerResponsedescribeStreamConsumer(String streamArn, String consumerName)Describe stream consumer.software.amazon.awssdk.services.kinesis.model.GetRecordsResponsegetRecords(String streamArn, String shardId, StartingPosition startingPosition, int maxRecordsToGet)Retrieves records from the stream.software.amazon.awssdk.services.kinesis.model.StreamDescriptionSummarygetStreamDescriptionSummary(String streamArn)Obtains stream metadata.List<software.amazon.awssdk.services.kinesis.model.Shard>listShards(String streamArn, ListShardsStartingPosition startingPosition)Obtains the shards associated with a given stream.software.amazon.awssdk.services.kinesis.model.RegisterStreamConsumerResponseregisterStreamConsumer(String streamArn, String consumerName)Registers an enhanced fan-out consumer against the stream.
-
-
-
Method Detail
-
getStreamDescriptionSummary
software.amazon.awssdk.services.kinesis.model.StreamDescriptionSummary getStreamDescriptionSummary(String streamArn)
Obtains stream metadata.- Parameters:
streamArn- the ARN of the stream- Returns:
- stream information.
-
listShards
List<software.amazon.awssdk.services.kinesis.model.Shard> listShards(String streamArn, ListShardsStartingPosition startingPosition)
Obtains the shards associated with a given stream.- Parameters:
streamArn- the ARN of the streamstartingPosition- starting position for shard discovery request. Used to skip already discovered/not used shards- Returns:
- shard list
-
getRecords
software.amazon.awssdk.services.kinesis.model.GetRecordsResponse getRecords(String streamArn, String shardId, StartingPosition startingPosition, int maxRecordsToGet)
Retrieves records from the stream.- Parameters:
streamArn- the ARN of the streamshardId- the shard to subscribe fromstartingPosition- the starting position to read frommaxRecordsToGet- the maximum amount of records to retrieve for this batch- Returns:
- the response with records. Includes both the returned records and the subsequent shard iterator to use.
-
registerStreamConsumer
software.amazon.awssdk.services.kinesis.model.RegisterStreamConsumerResponse registerStreamConsumer(String streamArn, String consumerName)
Registers an enhanced fan-out consumer against the stream.- Parameters:
streamArn- the ARN of the streamconsumerName- the consumerName- Returns:
- the register stream consumer response
-
deregisterStreamConsumer
software.amazon.awssdk.services.kinesis.model.DeregisterStreamConsumerResponse deregisterStreamConsumer(String consumerArn)
De-registers an enhanced fan-out consumer against the stream.- Parameters:
consumerArn- the ARN of the consumer to deregister- Returns:
- the de-register stream consumer response
-
describeStreamConsumer
software.amazon.awssdk.services.kinesis.model.DescribeStreamConsumerResponse describeStreamConsumer(String streamArn, String consumerName)
Describe stream consumer.- Parameters:
streamArn- the ARN of the Kinesis streamconsumerName- the name of the Kinesis consumer- Returns:
- the describe stream consumer response
-
-