Class SpringDynamoDBStreamsAdapterClient

java.lang.Object
com.amazonaws.services.dynamodbv2.streamsadapter.AmazonDynamoDBStreamsAdapterClient
io.awspring.cloud.kinesis.integration.SpringDynamoDBStreamsAdapterClient
All Implemented Interfaces:
AutoCloseable, software.amazon.awssdk.awscore.AwsClient, software.amazon.awssdk.core.SdkClient, software.amazon.awssdk.services.kinesis.KinesisAsyncClient, software.amazon.awssdk.utils.SdkAutoCloseable

public class SpringDynamoDBStreamsAdapterClient extends com.amazonaws.services.dynamodbv2.streamsadapter.AmazonDynamoDBStreamsAdapterClient
This is Spring Cloud DynamoDB Adapter to be able to support ListShards operations. Also, adapts AmazonDynamoDBStreamsAdapterClient.getDynamoDBStreamsRecords(software.amazon.awssdk.services.dynamodb.model.GetRecordsRequest) to getRecords(software.amazon.awssdk.services.kinesis.model.GetRecordsRequest) for regular KinesisMessageDrivenChannelAdapter. The KCL bindings uses KclMessageDrivenChannelAdapter's native support for AmazonDynamoDBStreamsAdapterClient API.
Since:
4.0
Author:
Asiel Caballero, Artem Bilan
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.amazonaws.services.dynamodbv2.streamsadapter.AmazonDynamoDBStreamsAdapterClient

    com.amazonaws.services.dynamodbv2.streamsadapter.AmazonDynamoDBStreamsAdapterClient.SkipRecordsBehavior
  • Field Summary

    Fields inherited from interface software.amazon.awssdk.services.kinesis.KinesisAsyncClient

    SERVICE_METADATA_ID, SERVICE_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpringDynamoDBStreamsAdapterClient(software.amazon.awssdk.services.dynamodb.streams.DynamoDbStreamsClient dynamoDbStreamsClient)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    CompletableFuture<software.amazon.awssdk.services.kinesis.model.GetRecordsResponse>
    getRecords(software.amazon.awssdk.services.kinesis.model.GetRecordsRequest getRecordsRequest)
     
    CompletableFuture<software.amazon.awssdk.services.kinesis.model.ListShardsResponse>
    listShards(software.amazon.awssdk.services.kinesis.model.ListShardsRequest request)
    List shards for a DynamoDB Stream using its DescribeStream API, as they don't support ListShards operations.

    Methods inherited from class com.amazonaws.services.dynamodbv2.streamsadapter.AmazonDynamoDBStreamsAdapterClient

    close, describeStream, describeStreamWithFilter, getDynamoDBStreamsRecords, getShardIterator, getSkipRecordsBehavior, listStreams, serviceClientConfiguration, serviceName, setSkipRecordsBehavior

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.awssdk.services.kinesis.KinesisAsyncClient

    addTagsToStream, addTagsToStream, createStream, createStream, decreaseStreamRetentionPeriod, decreaseStreamRetentionPeriod, deleteResourcePolicy, deleteResourcePolicy, deleteStream, deleteStream, deregisterStreamConsumer, deregisterStreamConsumer, describeAccountSettings, describeAccountSettings, describeLimits, describeLimits, describeLimits, describeStream, describeStreamConsumer, describeStreamConsumer, describeStreamSummary, describeStreamSummary, disableEnhancedMonitoring, disableEnhancedMonitoring, enableEnhancedMonitoring, enableEnhancedMonitoring, getRecords, getResourcePolicy, getResourcePolicy, getShardIterator, increaseStreamRetentionPeriod, increaseStreamRetentionPeriod, listShards, listStreamConsumers, listStreamConsumers, listStreamConsumersPaginator, listStreamConsumersPaginator, listStreams, listStreams, listStreamsPaginator, listStreamsPaginator, listStreamsPaginator, listTagsForResource, listTagsForResource, listTagsForStream, listTagsForStream, mergeShards, mergeShards, putRecord, putRecord, putRecords, putRecords, putResourcePolicy, putResourcePolicy, registerStreamConsumer, registerStreamConsumer, removeTagsFromStream, removeTagsFromStream, splitShard, splitShard, startStreamEncryption, startStreamEncryption, stopStreamEncryption, stopStreamEncryption, subscribeToShard, subscribeToShard, tagResource, tagResource, untagResource, untagResource, updateAccountSettings, updateAccountSettings, updateMaxRecordSize, updateMaxRecordSize, updateShardCount, updateShardCount, updateStreamMode, updateStreamMode, updateStreamWarmThroughput, updateStreamWarmThroughput, waiter
  • Constructor Details

    • SpringDynamoDBStreamsAdapterClient

      public SpringDynamoDBStreamsAdapterClient(software.amazon.awssdk.services.dynamodb.streams.DynamoDbStreamsClient dynamoDbStreamsClient)
  • Method Details

    • listShards

      public CompletableFuture<software.amazon.awssdk.services.kinesis.model.ListShardsResponse> listShards(software.amazon.awssdk.services.kinesis.model.ListShardsRequest request)
      List shards for a DynamoDB Stream using its DescribeStream API, as they don't support ListShards operations. Returns the result adapted to use the AmazonKinesis model.
      Parameters:
      request - Container for the necessary parameters to execute the ListShards service method
      Returns:
      The response from the DescribeStream service method, adapted for use with the AmazonKinesis model
    • getRecords

      public CompletableFuture<software.amazon.awssdk.services.kinesis.model.GetRecordsResponse> getRecords(software.amazon.awssdk.services.kinesis.model.GetRecordsRequest getRecordsRequest) throws software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException
      Specified by:
      getRecords in interface software.amazon.awssdk.services.kinesis.KinesisAsyncClient
      Overrides:
      getRecords in class com.amazonaws.services.dynamodbv2.streamsadapter.AmazonDynamoDBStreamsAdapterClient
      Throws:
      software.amazon.awssdk.awscore.exception.AwsServiceException
      software.amazon.awssdk.core.exception.SdkClientException